Program.cs 598 B

123456789101112131415161718192021222324252627282930
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. namespace @struct
  7. {
  8. internal class Program
  9. {
  10. static void Main(string[] args)
  11. {
  12. }
  13. }
  14. public struct Employee
  15. {
  16. public string Name;
  17. public string Sex;
  18. public Employee(string name,string sex)
  19. {
  20. Name = name;
  21. Sex = sex;
  22. }
  23. public void ShowInfo()
  24. {
  25. Console.WriteLine("员工姓名:{0},员工性别:{1}",Name,Sex);
  26. }
  27. }
  28. }