--今天大组开会突然宣布我们这些研一的小朋友们要开始工作成长了!要开发一个软件,准备用C#,哭泣,没经验,不会,好的,站起来,冲鸭!!
--C#部分的内容是学习菜鸟教程里相关内容的总结,学习网址⬇️⬇️⬇️
http://www.runoob.com/csharp/csharp-type-conversion.html |
using System;
namespace TypeConversionApplication
{
class StringConversion
{
static void Main(string[] args)
{
//32位有符号整数类型
int i = 75;
//32位单精度浮点型
float f = 53.005f;
//64位双精度浮点型
double d = 2345.7652;
//布尔值
bool b =true;
//转换程字符串类型
//注意i.ToString,里面是.不是,!
Console.WriteLine(i.ToString());
Console.WriteLine(f.ToString());
Console.WriteLine(d.ToString());
Console.WriteLine(b.ToString());
Console.ReadKey();
}
}
}