Where are operators defined in C# ?
Anyone can explain how C# compiler knows what operator exist? Where actually these operators are defined? For ex: how compiler know '+' exist ?
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
VulpesPosted Apr 10, 2014, 1:42 PM
However, the C# compiler has recently been rewritten in C# itself (as part of the Roslyn project) and open sourced. You can therefore browse the source code if you like:
http://roslyn.codeplex.com/
chakresh singhPosted Apr 10, 2014, 12:59 PM
VulpesPosted Apr 10, 2014, 12:42 PM
http://www.c-sharpcorner.com/Ebooks/Free/83/
The rules for using these operators are built into the compiler as is the grammar for the language as a whole.