Difference between initialize and instantiate in C#

Difference between initialize and instantiate in C#

Howdy Reader,

With the help of this post, I am going to explain you the difference between initialize and instantiate in C# with help of simple example rather pseudo-code.

Difference between initialize and instantiate in C# Click To Tweet

Initialization

Initialization means assigning initial value to variables after declaring or while declaring.
All variables are always given an initial value at the point the variable is declared. Thus, all variables are initialized.

Difference between initialize and instantiate

Difference between initialize and instantiate in C#

Example for initialization

Instantiation

Instantiation means defining or creating new object for class to access all properties like methods, fields, etc. from class.

Example for instantiation

In the above example, we created new object by instantiating CSharp class. By using the object csharp we can access all the methods and properties of CSharp class.

I hope this post helps you to understand Difference between initialize and instantiate in C#. For more article on C#, you may refer here.

What do you think?

Dear Reader,
If you have any questions or suggestions please feel free to email us or put your thoughts as comments below. We would love to hear from you. If you found this post or article useful then please share along with your friends and help them to learn.

Happy Reading:)