• 2022-06-15
    在C#中,下列结构或者类定义正确的是(选一项)
    A: public struct Person{ string name; int age; public void ShowName(){ Console.WriteLine(name); }}
    B: public struct Person{ string name; int age; public Person(){ Conssole.WriteLine(name); }}
    C: public class Person{ string name; int age; public Person(){ Conssole.WriteLine(name); }}
    D: public class Person{ string name; int age; public Person(string name){ Conssole.WriteLine(name); }}
  • 举一反三