To create an object, you need to instantiate a class, or create a class instance.

SampleClass sampleObject = new SampleClass();   
// Set a property value.   
SampleClass sampleObject = new SampleClass
{
FirstProperty = "A",
SecondProperty = "B"
};

Last modified: March 20, 2019

Author

Comments

Write a Reply or Comment