官术网_书友最值得收藏!

  • Learn C# in 7 days
  • Gaurav Aroraa
  • 126字
  • 2021-07-08 09:51:25

Data types

These are also famous as compliant value types, simple value types, and basic value types. I call these data types because of their power to define the nature of values. The following table contains all value types:

 

We can prove the values mentioned in the preceding table with the help of the following code snippet:

//Code is omitted 
public static void Display() 
{ 
WriteLine("Table :: Data Types"); 
var dataTypes = DataTypes(); 
WriteLine(RepeatIt('\u2500', 100)); 
WriteLine("{0,-10} {1,-20} {2,-50} {3,-5}", "Type", "CLR Type", "Range", "Default Value"); 
WriteLine(RepeatIt('\u2500', 100)); 
foreach (var dataType in dataTypes) 
WriteLine("{0,-10} {1,-20} {2,-50} {3,-5}", dataType.Type, dataType.CLRType, dataType.Range, 
dataType.DefaultValue); 
WriteLine(RepeatIt('\u2500', 100)); 
} 
//Code is omitted 

In the preceding code, we are displaying maximum and minimum values of data types, which produces the following output:

主站蜘蛛池模板: 察雅县| 呼伦贝尔市| 巨鹿县| 徐水县| 遂昌县| 绥芬河市| 石门县| 婺源县| 合山市| 政和县| 柘城县| 姜堰市| 瓦房店市| 方山县| 安多县| 象州县| 呼伦贝尔市| 泾源县| 郴州市| 东乌珠穆沁旗| 鄂托克前旗| 波密县| 云龙县| 阳新县| 潢川县| 玛纳斯县| 石首市| 青河县| 武穴市| 武乡县| 水富县| 苏尼特左旗| 定安县| 图们市| 嘉峪关市| 武汉市| 桂阳县| 渝中区| 赤水市| 全椒县| 丽江市|