PRN221_-_FA_2024_-_FE_3051.webp
AllMight90

PRN221_-_FA_2024_-_FE_3051.webp

Kizspy | Question: 33
(Choose 1 answer)
public class Student{
[JsonPropertyName("fullName")]public string firstName { get; set; }
public int age{ get; set; }
}
//--
class Program{
static void Main(string[] args){
Student john = new Student {firstName = "john", age=20 };
var strJson = JsonSerializer.Serialize(john);
Console.WriteLine(strJson);
Console.ReadKey();
}
}
Which one of the following is the output of the above code?
A. {"fullName":"john","age":20}
B. {"firstName":"john","age":20}
C. ("firstName":"john"}
D. {"fullName":"john"}

Thông tin

Category
PRN221
Thêm bởi
AllMight90
Ngày thêm
Lượt xem
1,252
Lượt bình luận
6
Rating
0.00 star(s) 0 đánh giá

Share this media

Back
Bên trên Bottom