PRN221_-_FA_2024_-_RE_3088.webp
Q

PRN221_-_FA_2024_-_RE_3088.webp

Kizspy | Question: 35
(Choose 1 answer)
public class Employee{
public string firstName { get; set; } [JsonIgnore]public string lastName { get; set; } }
//--
class Program{
static void Main(string[] args){string empJson = @"{""firstName"":"" John"",""lastName"".""Doe""
}";var emp = JsonSerializer. Deserialize<Employee>(empJson);Console.WriteLine($"{emp.firstName}:{emp.lastName}");Console.ReadKey();
}
}
Which one of the following is the output of the above code?
A. John:
B. John:Doe
C. Doe:
D. Compile-time error

Thông tin

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

Share this media

Back
Bên trên Bottom