Yes, it is possible - you can use ilasm (comes with the .NET SDK) to compile your code. However, there is no IDE support for Visual Studio. There are no performance benefits that you can derive from this that you cannot get by other means - in particular, C ++ / CLI covers all the low-level CLR functions that may bring some benefit and are not available with C # or VB - in the first queue, unboxing without a copy ( ref ), simple unlimited function pointers (as opposed to delegates) and the associated calli IL instruction and ref (a managed pointer in CLI) local variables (as opposed to just parameters).
source share