PRN221_-_SU_2024_-_Block_5_-_FE_2668.webp
pure_pearl

PRN221_-_SU_2024_-_Block_5_-_FE_2668.webp

Kizspy | Question: 34
(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
pure_pearl
Ngày thêm
Lượt xem
1,221
Lượt bình luận
3
Rating
0.00 star(s) 0 đánh giá

Share this media

Back
Bên trên Bottom