C# Console控制台程序 期末准备 遗漏知识点

时间:2020-12-30 11:36:51   收藏:0   阅读:0

1、任何类型+“”=字符串类型

2、泛型(动态数组):

List<int> a = new List<int>();

List<数据类型> 名字 = new List<数据类型>();

3、string转换为int:

string s=Console.ReadLine();

int a=Convert.ToInt32(s);

//int a=int.TryParse(s);

4、int转换为string:

string str=a.ToString();

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!