All code written in .NET languages compiles to MSIL, but are there specific tasks / operations that you can do only using MSIL directly?
Let us also have things done easier in MSIL than C#, VB.NET, F#, j# or any other .NET language.
So far we have this:
1. Tail recursion
2. Generic Co/Contravariance
3. Overloads which differ only in return types
4. Override access modifiers
5. Have a class which cannot inherit from System.Object
6. Filtered exceptions (can be done in vb.net)
7. Calling a virtual method of the current static class type.
8. Get a handle on the boxed version of a value type.
9. Do a try/fault.
10. Usage of forbidden names.
11. Define your own parameterless constructors for value types.
12. Define events with a raise
element.
13. Some conversions allowed by the CLR but not by C#.
14. Make a non main()
method as the .entrypoint
.
15. work with the native int
and native unsigned int
types directly.
16. Play with transient pointers
17. emitbyte directive in MethodBodyItem
18. Throw and catch non System.Exception types
19. Inherit Enums (Unverified)
20. You can treat an array of bytes as a (4x smaller) array of ints.
21. You can have a field/method/property/event all have the same name(Unverified).