.NET學習筆記之Ado.NET 04

 int  n = null;  bool b=null; 錯誤:值類型不能複製爲null值   int  ?n = null;  bool ?b=null;值類型賦值爲null型 需要加? string s = null;引用類型可以複製爲null值 person.Age = result.GetInt32(2);  正確 person.Height = result.IsDBNull(3)?n
相關文章
相關標籤/搜索