PRN211_-_SU_2024_-_FE_2375.webp
V

PRN211_-_SU_2024_-_FE_2375.webp

Kizspy | Question: 31
(Choose 1 answer)
record A{
public int x { get; set; } = 1;
public int y { get; set; } = 2;
public void Print()=>Console.Write($"{x},{y}");
}
record B: A{
public B(){
x++;
y++;
}
}
class Program {
static void Main(string[] args) {
A obj1 = new B();
obj1.Print();
Console.WriteLine();
}
}
The output will be:
A. 2,3
B. 3,2
C. 1,2
D. 2,1

Thông tin

Category
PRN211
Thêm bởi
Việt Hoàng1
Ngày thêm
Lượt xem
841
Lượt bình luận
6
Rating
0.00 star(s) 0 đánh giá

Share this media

Back
Bên trên Bottom