请我需要通过C#对数组进行准确的解释,包括对数组进行排序 [英] please i need accurate explain about array by c# including sorting array
本文介绍了请我需要通过C#对数组进行准确的解释,包括对数组进行排序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
请我是初学者
我需要通过c#进行有关数组的准确解释,包括对array
please i''m beginner
i need accurate explain about array by c# including sorting array
推荐答案
进行排序.数组是相同类型的对象序列,可以通过集合名称引用它,并通过该名称的索引(通常是整数,但有时是字符串)进行访问.
例如:
An array is a sequence of objects of the same type, which can be referered to by a collective name, and accessed via an index to that name (normally integer, but sometimes string).
For example:
string[] myStrings = new string[] ("A string", "Another string"};
Console.WriteLine(myStrings[0]);
"myStrings"是集合名称,"0"是第一个字符串的索引.
对数组进行排序非常简单:
"myStrings" is the collective name, and "0" is the index of the first string.
Sorting an array is very simple:
Array.Sort(myArray);
会做到的.
您还想知道什么?
Will do it.
What else do you want to know?
这篇关于请我需要通过C#对数组进行准确的解释,包括对数组进行排序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文