Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
[Timestamp] public byte[] Timestamp { get; set; }
如何为 Timestamp 分配一个虚拟值?
如果您只是想避免空值:
Timestamp = new byte[0];
public class Time { [Timestamp] private Lazy<byte[]> _timestamp=new Lazy<byte[]>(); [Timestamp] public Lazy<byte[]> Timestamp { get { return _timestamp; } set { _timestamp = value; } } }