Although it has some elements derived from Visual Basic and Java, C++ is C#'s closest relative.
In an important change from C++, C# code does not require header files. All code is written inline.
As touched on above, the .NET runtime in which C# runs performs memory
management, taking care of tasks like garbage collection. Because of
this, the use of pointers in C# is much less important than in C++.
Pointers can be used in C#, where the code is marked as 'unsafe', but
they are only really useful in situations where performance gains...