.net - How to convert single dimensional arrays to multi dimensional ones? (C#) -


I have to use a method that accepts double [,], but I only have one double [] . How do I convert it?

The solution so far:

  var array = new double [1, x. Lang]; Foreground (Energetable. Ranges in Diverse I (0, X.Long)) {array, [0, I] = X; }  

There is no direct way to double the contents double [,] Assume that you want it in one line:

  double [,] arr = new double [1, original]. Length]; For (int i = 0; i & lt; root; height; ++ i) arr [0, i] = root [i];  

Comments

Popular posts from this blog

email - PHP mail error ... failed to open stream : permission denied -

sql server - SQL Query - Delete duplicates if more than 3 dups? -

c# 3.0 - Issue with getting 2 chars from string using indexer -