LoginSignup
3
5

More than 5 years have passed since last update.

C# LINQ 覚書

Posted at

自分用に。

2次元配列を1次元配列に

int[,] array = { { 1, 2, }, { 3, 4 } };
var x = array.Cast<int>();
// {1, 2, 3, 4}

多次元配列を LINQ で簡単に扱おう - xin9le.net

ジャグ配列を1次元配列に

int[][] array = { new int[]{ 1, 2, }, new int[] { 3, 4 } };
var x = array.SelectMany(x => x).ToArray();
// {1, 2, 3, 4}

C# - C# のジャグ配列を1次元の配列に変換する方法を幾つか教えてください。C#(44909)|teratail

3
5
0

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
3
5