网友您好, 请在下方输入框内输入要搜索的题目:
YouareimplementinganASP.NETpage.Client-sidescriptrequiresdata.YourapplicationincludesaclassnamedPersonwithaNamepropertyoftypestring.Thecode-behindfileofthepageincludesthefollowingcodesegment.YouneedtousetheJavaScriptSerializerclasstoserializeonlytheNamepropertyofeachiteminthepeoplelist.Whichcodesegmentshouldyouuse?()
A.JsonValue=json.Serialize(people.Select(p=>p.Name));
B.varnames=frompersoninpeopleselectperson;JsonValue="{"+json.Serialize(names)+"}";
C.JsonValue=json.Serialize(people.SelectMany(p=>Name.AsEnumerable()));
D.varnames=frompersoninpeopleselectperson;JsonValue=json.Serialize(names);
参考答案