Пример #1
0
 public static PersonModel PrintInfo(this PersonModel person)
 {
     Console.WriteLine($"Name: {person.Name}, Age: {person.Age}");
     return(person);
 }
Пример #2
0
 public static PersonModel SetDefaultAge(this PersonModel person, int age)
 {
     person.Age = age;
     return(person);
 }