• 2022-06-11
    在C#中,下列代码的运行结果是( )(选一项)[br][/br] struct Student { public int age; public string name; public Student(int age,string name) { this.sge = sge; this.name = name; } } public class Test { static void Main() { Student stu1 = new Student(18,"小芳"); Student stu2 = new Student(24,"小刚"); stu2 = stu1; stu1.age = 30; stu1.name = "小燕"; Console.WriteLine(stu2.age); Console.WriteLine(stu2.name); } }
    A: 18 小芳
    B: 18 小燕
    C: 30 小燕
    D: 30 小芳
  • 举一反三