Re:Learn C programming and the rest will come
by maxxxxx on Wednesday November 29, 2017 @12:34PM
(#15808873)
I wouldn't recommend using C# for learning these concepts. Unsafe mode exists but it's not very straightforward in my view. I don't think I could understand unsafe mode without prior knowledge of C.
- compiles to native code via ngen, mono, .NET Native, MDIL, IL2CPP
- has pointers in unsafe code
- has value types
- structs allow for layout control
- value types can be stack allocated, it also allows for alloca in unsafe code
- memory can be allocated outside GC via safe handles or marshaling services
- latest versions have support for zero allocation memory references
The only thing it doesn't do properly is to have global statics, but it can be worked around via a singleton.