• Source
    1. using System;
    2.  
    3. namespace ConsoleApplication2
    4. {
    5. class Program
    6. {
    7.  
    8. static void Main(string[] args)
    9. {
    10. var p = new Person
    11. {
    12. FullName = "Le Minh Tuan",
    13. Age = 26,
    14. Address = "Da Nang, Viet Nam"
    15. };
    16. p.ShowInfo();
    17. Console.ReadLine();
    18. }
    19. }
    20.  
    21. class Person
    22. {
    23. public string FullName;
    24. public int Age;
    25. public string Address;
    26. public void ShowInfo()
    27. {
    28. Console.WriteLine(" Name:{0} \n Age: {1} \n Address: {2}", FullName, Age, Address);
    29. }
    30. }
    31. }