The .NET Framework contains many parts. One of the most important is the CLR - Common Language Runtime. All .NET languages depend on it, including C #, because they create IL code that cannot be executed by a machine processor. Instead, the CLR executes it.
And there is also a base class library, BCL, which is available for use in any .NET language: C #, VB.NET, Managed C ++, F #, IronRuby, you name it. I doubt it was written in C #. It does not depend on any features of these languages, because classes and OOP are built into the CLR environment.
So, yes, C # knows about the .NET platform, it must know about it. Think about IEnumerable : to compile foreach into GetEnumerator() and MoveNext() calls, the C # compiler needs to know that, well, IEnumerable exists. And a little special.
Or think of attributes! The C # compiler has internal knowledge of which methods the Attribute interface provides.
But the CLR itself knows nothing about C #. For everyone.
Joker_vD
source share