Hacker News new | past | comments | ask | show | jobs | submit login

This isn't feature that the CLR knows. It is just syntactic sugar from the C# compiler; As it will prepend GlobalFuncs to the Greet method.



Sorry, I didn't mean to confuse the issue. The CLR can do global functions. But no .NET language currently supports it. The example I gave was just a way of achieving visually the effect of global functions (which I assumed was the major issue of the OP, because there's no other cost to using static methods than having the qualify them with the type name).




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: