Category C#

Partial Classes in C#

A partial class is an ability to separate the implementation of a single class into multiple files and these files are combined to create in a single class when the code is compiled. Partial classes are created by using the…

Why do we need Serialization?

When you create an object in a .NET or Java application, you don’t need to think about how it is stored in memory, because the .NET/Java framework takes care of that for you and does the necessary serialization. What about…

What is a Static Constructor in C#

A static constructor is a way to initialize any static data or to perform a particular action that needs to be performed only once. A static constructor is called automatically before the first instance is created or any static member is referenced.…

Call C++ Native code from C#

Calling C++ Native (Unmanaged) code from (Managed) C# code: C# can call C++ code only if C++ code is a DLL (Dynamic Link Library).Create a C++ project in Visual Studio and change its type to a DLL.Here is what you…