如何將一個陣列的長度賦給一個整型變數
uj5u.com熱心網友回復:
建議先看書上的代碼, 把基礎的代碼一行行照著敲, 敲的時候自己思考和記憶。C# 的, 供你參考:

using System;
namespace HelloWorld2
{
class Program
{
static void Main(string[] args)
{
int[] arr = { 1,2 };
int len = arr.Length;
Console.WriteLine("陣列長度:{0}", len);
Console.Read();
}
}
}
轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/109030.html
標籤:疑難問題
上一篇:排序
