📄 cs_array_out.cs
字号:
// cs_array_out.cs
using System;
class TestOut
{
static public void FillArray(out int[] myArray)
{
// Initialize the array:
myArray = new int[5] {1, 2, 3, 4, 5};
}
static public void Main()
{
int[] myArray; // Initialization is not required
// Pass the array to the callee using out:
FillArray(out myArray);
// Display the array elements:
Console.WriteLine("Array elements are:");
for (int i=0; i < myArray.Length; i++)
Console.WriteLine(myArray[i]);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -