1 [DebuggerBrowsable(DebuggerBrowsableState.Never)] 2 [__DynamicallyInvokable] 3 public T Value 4 { 5 [__DynamicallyInvokable] get 6 { 7 if (this.m_boxed != null) 8 { 9 Lazy<T>.Boxed boxed = this.m_boxed as Lazy<T>.Boxed; 10 if (boxed != null) 11 return boxed.m_value; 12 (this.m_boxed as Lazy<T>.LazyInternalExceptionHolder).m_edi.Throw(); 13 } 14 Debugger.NotifyOfCrossThreadDependency(); 15 return this.LazyInitValue(); 16 } 17 }
既然在第7行已经判断了m_boxed非空,为什么第10行的判断语句还要再判断一次?
第9行是转换类型,之后在判断是否为空