How can global function exist in C# when everything is defined inside a class? I was reading the documentation of OpCodes.Call at MSDN, and was surprised to see the following wordings,
The metadata token carries sufficient information to determine whether the call is to a static method, an instance method, a virtual method, or a global function.
Global function? Does it exist in C#? (It definitely doesn't refer to static
method, as it's explicitly listed along with global function).
You can't have global functions in C#, it's just not part of the language. You have to use a static method on some class of your choosing to get similar functionality.
However C# is not the only language that uses the CLR. One can write Managed C++, which can have global functions.