PRN221_-_SU_2024_-_FE_2416.webp
H

PRN221_-_SU_2024_-_FE_2416.webp

Kizspy | Question: 29 (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();}
FUOVER
}
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
Hạnh Phúc
Ngày thêm
Lượt xem
1,218
Lượt bình luận
5
Rating
0.00 star(s) 0 đánh giá

Share this media

Back
Bên trên Bottom