c#第四天

36 阅读1分钟

一.随机数生成

image.png

二.数组

数组的下标从0开始,有两种创建数组的方式

第一种,

image.png

第二种,数组限定长度

image.png

三.遍历数组

1.用for循环遍历数组

image.png

2.用foreach

image.png

四.字母大小转换,字符串中的字母转换大小写

image.png

五.Trim()

image.png

六.字符串分割 Split()

//此图用逗号分割

image.png