Pointers in C#
Introduction: C# provides very limited support for pointers. C# pointers are nothing but variables containing memory location of another type. C# pointers can only contain the memory location of value types and arrays. Pointers in C# are not tracked by the default garbage collection mechanism. For the same reason, pointers can not point to a reference type or structure type that contains a reference type. C# Pointers can point to only basic data types like enum types, bool types, other pointers types, and structs that contain unmanaged data types, not reference types. Declairation of C# Pointers: The template of declaring…