The C Sharp (C#) programming language is a widely used language. One of the key features of C# is that it is a compiled language, meaning a program - called a compiler - reads through the code and converts it to a machine language. On the other hand, an interpreted language (for example, Python) is read by the computer as plain text as a program runs. In a compiled language, new code cannot be compiled and ran after the application is published, which is why the C# interpreter library was created.
The purpose of this document is to define the C# Interpreter and its functions. The intended audience is new programmers of C# with the most basic of variable and flow management knowledge. It should be noted that the Interpreter is not a product of Microsoft and has many differences. Those differences will be described in detail, as to how they should work in the compiler and then how the C# Interpreter handles them.
This is not a complete remake of C#, nor was it ever intended to be. It is missing half the features, and they are all the more advanced or permanent ones. Instead, it is most useful for debugging; it often helps by testing methods with various parameters and reading the outputs. It can also be used to allow a user to create custom formulas for graphs and such.
The C# Interpreter is designed to have as many similarities with C# as possible. So, if it is in the C# Reference (Microsoft Docs) and it is mentioned in this document, it likely works the same way - or nearly the same. If a feature specified in this document seems to be missing or broken, send a bug report to the author at jonathan.rabideau@gmail.com. The bug report must contain both sides of the code intended to run (comments appreciated), a copy of the error message, a brief explanation of what was attempted, and any relevant context (if accessing a member, I need the class’ member list, etc.). If critical information is missing, the author may reply asking for additional information or ignore the report.
Next: Comparison with C#