2013年微软认证:微软认证70-562考试精选模拟试题(7)

牛课网 考试宝典 更新时间:2024-05-14 14:08:02

浙江湖州中考语文试卷 小儿厌食的中医辨证论治 佳木斯历届高考状元

微软考试是随报随考,在复习的过程中中还是不够全面,为了帮助广大考生系统全面的复习好《微软认证学科》,我们考吧网整理了微软认证模拟试题,本次汇编的模拟试题希望对你的考试有所帮助,预祝你考试顺利。

编辑推荐:2013年微软认证:微软认证考试必备经典试题汇总三

You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5.

You define the following class.

public class Product {

public decimal Price { get; set; }

}

Your application contains a Web form with a Label control named lblPrice.

You use a StringReader variable named xmlStream to access the following XML fragment.

35

You need to display the price of the product from the XML fragment in the lblPrice Label control.

Which code segment should you use?

A.

DataTable dt = new DataTable(); dt.ExtendedProperties.Add("Type", "Product");

 

dt.ReadXml(xmlStream);

lblPrice.Text = dt.Rows[0]["Price"].ToString();

B.

XmlReader xr = XmlReader.Create(xmlStream);

Product boughtProduct = xr.ReadContentAs(typeof(Product), null) as Product;

lblPrice.Text = boughtProduct.Price.ToString();

C.

XmlSerializer xs = new XmlSerializer(typeof(Product));

Product boughtProduct = xs.Deserialize(xmlStream) as Product;

lblPrice.Text = boughtProduct.Price.ToString();

D.

XmlDocument xDoc = new XmlDocument(); xDoc.Load(xmlStream);

Product boughtProduct = xDoc.OfType().First();

lblPrice.Text = boughtProduct.Price.ToString();

Answer: C

You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5.

You add a TextBox control named TextBox1.

You write the following code segment for validation.

protected void CustomValidator1_ServerValidate( object source, ServerValidateEventArgs args) {

DateTime dt = String.IsNullOrEmpty(args.Value)

DateTime.Now : Convert.ToDateTime(args.Value);

args.IsValid = (DateTime.Now - dt).Days < 10;

}

You need to validate the value of TextBox1.

Which code fragment should you add to the Web page?

A.

B.

C.

D.

Answer: A

考试宝典安装说明

宝典适用于手机、电脑、平板,您可安装客户端或在浏览器使用。

电脑版

手机版

网页版

考试宝典咨询
服务热线

TEL:029-88699698