请描述您的问题
标题:腾讯云云产品新购特惠,五折上云!
地址:https://cloud.tencent.com/act/first_purchase?utm_source=portal&utm_medium=cdb&utm_campaign=firstpurchase&utm_term=0110
浏览器信息
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36
请描述您的问题
标题:腾讯云云产品新购特惠,五折上云!
地址:https://cloud.tencent.com/act/first_purchase?utm_source=portal&utm_medium=cdb&utm_campaign=firstpurchase&utm_term=0110
浏览器信息
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:58.0) Gecko/20100101 Firefox/58.0
鉴于doubles不能在易失性字段中使用,这是一个安全的替代方案吗?或者它是否会导致空指针异常。
public sealed class DoubleStorage
{
public readonly double Value;
public DoubleStorage(double value)
{
this.Value = value;
}
public static readonly DoubleStorage Zero = new DoubleStorage(0);
}
public sealed class Val
{