Under what inputs does IsSpecialName return true? From my brief research I've found that property accessors and operator overloads have special names, alongside any type with a name which contains an underscore. Can anyone give me a complete description of cases in which a type name is special?
In C programming language, %d and %i are format specifiers as where %d specifies the type of variable as decimal and %i specifies the type as integer. In usage terms, there is no difference in printf() function output while printing a number using %d or %i but using scanf the difference occurs.
%d is used to print decimal(integer) number ,while %c is used to print character . If you try to print a character with %d format the computer will print the ASCII code of the character.
The CLI specification as published in ECMA-335 is a decent source for info like this. Search the document for rtspecialname
(names that are special to the CLR) and specialname
(names that are special to tools. The specialname attribute is turned on for rtspecialnames. Giving these hits:
value__
field of an enumerated type.ctor
method of a class, the constructor.cctor
method of a class, the static constructorFirst of all IsSpecialName does not take any input. Also the property of Type is not really applicable to property accessors or operator overloads, since it's a property of a Type and operators/accessors are not types. This is despite what the MSDN article might tell you.
I would venture a guess that it returns true when the correspondent TypeAttribute is SpecialName
. You can refer to ECMA 335 Standard to find out what is supposed to be marked as a Special Name. Incidentally, you'll learn that it's things like operators and property accessors. This explains where the confusion in the MSDN article can come from.
I believe that on Type
this property is implemented mostly for the benefit of compilers and such that could require additional (as compared to what ECMA 335 mandate) special name handling. (Which could differ from compiler to compiler).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With