Open Rekkonnect opened 3 years ago
Here is the list of overload names from the framework design guidelines: https://docs.microsoft.com/en-us/dotnet/standard/design-guidelines/operator-overloads
Here's a good example of a type implementing many of these operators. http://fuget.org/packages/Genumerics/1.0.3/lib/netcoreapp3.0/Genumerics.dll/Genumerics/Number%601
There is a class that I believe is publicly available, containing the names of several special symbols, which is this.
Hey @TylerBrinkley, great library! I’ll get this fixed up.
@AlFasGD Thanks for the reference. Somewhere inside ILSpy is this table too. But it shouldn’t be hard for me to just write it out by hand.
It's not about it being hard to use a reference, it's about good practice. After all, those are constants that are well-defined by the compiler itself, handed over to you publicly.
Special methods like operators, implicit or explicit type conversion methods are displayed as
op_XXX
.For example, a class that implements the + operator will have its method displayed as
op_Addition
.The exact special names that could be detected and replaced are certainly documented somewhere.