Preventing Unsafe Code
C# differs notably from C and C++ in its omission of pointers as a data type. C# instead provides references and the ability to create objects that are managed by a garbage collector. Things that are not possible in C#:
Uninitialized variables
“Dangling” pointers
Expressions indexing an array out of its bounds