• Source
    1. using System;
    2.  
    3. class Person
    4. {
    5. public int Id { get; set; }
    6. public string FullName { get; set; }
    7. public int Age { get; set; }
    8.  
    9. public Person()
    10. {
    11.  
    12. }
    13.  
    14. public Person(int id, string fullName, int age)
    15. {
    16. Id = id;
    17. FullName = fullName;
    18. Age = age;
    19. }
    20. }
    21.  
    22. public class Test
    23. {
    24. public static void Main()
    25. {
    26. Person p = new Person(1,"Bravo Hex",25);
    27. Console.WriteLine(" Name: {0} \n Age: {1}",p.FullName,p.Age);
    28. Console.ReadKey();
    29. }
    30. }