Declare the backing fields Declare the properties Create an instance of the Person class and set values on the object
Define a class in C# and create an instance of the class Part 1 – Create a new console app and rename the existing class
Let’s follow the Microsoft C# programming guide here. First off create a new .Net console application. Next go ahead and right click and rename the Program class to This also renames the class to TestPerson. Now in the next post we’ll create the new class!
Create a new console app and rename the existing class Create a new class Create two instances from the class