Person john = new Person(); john.Name = "John Doe"; john.Age = 35; john.Address = "123 Main St.";
Person jane = new Person(); jane.Name = "Jane Smith"; jane.Age = 42; jane.Address = "456 Elm St."; jane.Age = 43;
public void PrintPersonInfo(Person p) { Console.WriteLine("Name: " + p.Name); Console.WriteLine("Age: " + p.Age); Console.WriteLine("Address: " + p.Address); } Person jim = new Person(); jim.Name = "Jim Johnson"; jim.Age = 25; jim.Address = "789 Oak St."; PrintPersonInfo(jim);In this example, we define a method that takes a Person instance as a parameter and prints out information about the person using the console. We then create a new Person instance, assign values for name, age, and address, and pass that instance to the method. Package library: System namespace of the .NET Framework