分类:
.NET
代码如下:
class Program
{
static void Main2(string[] args)
{
//写法1
string[] str2 = new string[3];
str2[0] = "hello2";
//写法2
string[] str = new string[3] { "hello", "word", "sdfs" };
//方法3
string[] str4 = new string[] { "hello4", "word", "sdfs" };
//方法4
string[] str5 = new[] { "hello5", "word", "sdfs", "sdfs5" };
//方法5
string[] str3 = { "hello3" };
Console.WriteLine(str[0]);
Console.WriteLine(str2[0]);
Console.WriteLine(str3[0]);
Console.WriteLine(str4[0]);
Console.WriteLine(str5[0]);
Console.ReadLine();
}
}评价
排名
6
文章
6
粉丝
16
评论
8
{{item.articleTitle}}
{{item.blogName}} : {{item.content}}
ICP备案 :渝ICP备18016597号-1
网站信息:2018-2025TNBLOG.NET
技术交流:群号656732739
联系我们:contact@tnblog.net
公网安备:
50010702506256
50010702506256
欢迎加群交流技术