单项选择题
您最近创建了一个名为车辆的可序列化的类。
类如下所示:
[Serializable]
public class Vehicle {
public string VIN;
public string Make;
private string Model;
private int Year;
private string Owner;
}
Certkiller.com 不想要序列化一个车辆对象,出于安全原因时永久保存的所有者字段。
您需要确保实现这一目标。
你应该做什么?()
A.适用于所有者字段的 OptionalField 属性。
B.应用,所以所有者字段的属性。
C.已实现 IFormatter 接口的自定义序列化的车辆类别。
D.做什么,因为在使用二进制序列化时,私营领域是永远不会保留。
点击查看答案
相关考题
-
单项选择题
You develop a serializable class for persisting objects as files. Every time an object is serialized, you have to update the database with the name of the object and location of that file. You elect to employ the OnSerialized attribute to achieve this objective. You now need to apply the OnSerialized attribute to a certain method. What should you do?()
A.
B.
C.
D. -
单项选择题
You have recently created a serializable class named Vehicle. The class is shown below: [Serializable] public class Vehicle{ public string VIN; public string Make; public string Model; public string Year; } You are planning to create a custom formatter class to control the formatting of Vehicle objects when they are serialized. You need to ensure that is achieved with as little development effort as possible. What should you do?()
A.
B.
C.
D. -
单项选择题
Certkiller.com has given you the task of serializing an object and writing it to a data file using binary serialization. You need to ensure that you meet these requirements. What should you do?()
A.
B.
C.
D.
