課程
/后端開發(fā)
/C#
/C#開發(fā)輕松入門
boolean是bool值類型的全稱吧?我記錯(cuò)了?
2018-03-05
源自:C#開發(fā)輕松入門 2-12
正在回答
1. bool是基本值類型,Boolean 是對(duì)象.2. bool是Boolean的別名.bool是C#中的,Boolean是.net Framework中的。出于對(duì)Boolean的好奇,我用Reflector反匯編了下mscorlib.dll,得到Boolean的源代碼,看到了下面的內(nèi)容:public struct Boolean : IComparable, IConvertible, IComparable<bool, IEquatable<bool{private bool m_value;//省略其他成員的定義.....}MSDN中解釋bool與Boolean的關(guān)系是:“bool 關(guān)鍵字是 System.Boolean 的別名”.實(shí)際使用無任何差別。它們的成員也是一樣的。
舉報(bào)
本門課程是C#語言的入門教程,將帶你輕松入門.NET開發(fā)
1 回答C#中沒有Boolean??
2 回答bool類型的等于運(yùn)算符不應(yīng)該是一個(gè)=么
1 回答C#基礎(chǔ)課學(xué)完了應(yīng)該繼續(xù)學(xué)什么
1 回答為什么沒有bool了呢
1 回答bool
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號(hào)-11 京公網(wǎng)安備11010802030151號(hào)
購課補(bǔ)貼聯(lián)系客服咨詢優(yōu)惠詳情
慕課網(wǎng)APP您的移動(dòng)學(xué)習(xí)伙伴
掃描二維碼關(guān)注慕課網(wǎng)微信公眾號(hào)
2018-03-06
1. bool是基本值類型,Boolean 是對(duì)象.
2. bool是Boolean的別名.bool是C#中的,Boolean是.net Framework中的。
出于對(duì)Boolean的好奇,我用Reflector反匯編了下mscorlib.dll,得到Boolean的源代碼,看到了下面的內(nèi)容:
public struct Boolean : IComparable, IConvertible, IComparable<bool, IEquatable<bool{private bool m_value;
//省略其他成員的定義.....}
MSDN中解釋bool與Boolean的關(guān)系是:“bool 關(guān)鍵字是 System.Boolean 的別名”.實(shí)際使用無任何差別。它們的成員也是一樣的。