[Timestamp]
public byte[] Timestamp { get; set; }
如何为Timestamp分配虚拟值?
答案 0 :(得分:1)
如果你只是想避免空值:
Timestamp = new byte[0];
答案 1 :(得分:0)
public class Time
{
[Timestamp]
private Lazy<byte[]> _timestamp=new Lazy<byte[]>();
[Timestamp]
public Lazy<byte[]> Timestamp
{
get
{
return _timestamp;
}
set { _timestamp = value; }
}
}