相关考题

单项选择题 您使用下面的代码片段来创建了一个汽车类 。 public class Vehicle { [XmlAttribute(AttributeName = "category")] public string vehicleType; public string model; [XmlIgnore] public int year; [XmlElement(ElementName = "mileage")] public int miles; public ConditionType condition; public Vehicle() { } public enum ConditionType { [XmlEnum("Poor")] BelowAverage, [XmlEnum("Good")] Average, [XmlEnum("Excellent")] AboveAverage }} 您创建了一个汽车类的实例. 您需要填充车辆类实例中下表所示的公共的字段。 MemberValuevehicleTypecarmodelraceryear2002miles15000conditionAboveAverage 需要确定此车辆类实例序列化时产生的 XML 块。 哪些XML块能表示序列化车辆实例的输出?()

单项选择题 You are creating a new security policy for an application domain. You write the following lines of code.  PolicyLevel policy = PolicyLevel.CreateAppDomainLevel();  PolicyStatement noTrustStatement =    new PolicyStatement(  policy.GetNamedPermissionSet("Nothing")); PolicyStatement fullTrustStatement =    new PolicyStatement(  policy.GetNamedPermissionSet("FullTrust"));  You need to arrange code groups for the policy so that loaded assemblies default to the Nothing permission set. If the assembly originates from a trusted zone, the security policy must grant the assembly the FullTrust permission set.  Which code segment should you use?()

单项选择题 您正在创建一个可列出远程计算机上的进程的应用程序。该应用程序需要一个执行以下任务的方法: 以名为strComputer 的字符串参数的形式接受远程计算机名称。 返回一个包含该计算机上正在运行的所有进程的名称的ArrayList 对象。 您需要编写一个代码段,该代码段检索远程计算机上正在运行的每个进程的名称,并将名称添加到ArrayList对象。 您应该使用哪个代码段?()