how to create an object inside class methos c# code example Example 1: c# create new object Car mycar = new Car(); Example 2: how to create class in C# class ClassName { }