1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

【C#】配列の定義

Posted at

配列の定義方法を忘れてしまいそうなので、自分用にメモ

方法1: 配列を定義してから、値を代入する。

int[] xList = new int[3];
xList[0] = 0;
xList[1] = 4;
xList[2] = 2;

方法2: 配列の定義と代入をワンライナーで行う。

int[] yList = new int[3] { 1, 5, 2 };

まとめ

ホントにメモ!!

1
0
6

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?