I am trying to write some code to return an array in C#, but don’t know the proper syntax. I think my method is set up correctly, but to set an array to the result of the method is what I’m having difficulty with.
Method Declaration:
double[,] function(double variable)
{
...
code
...
return array
}
Here is an example of how to create the two dimensional array, put some values in it, and return it:
If it is a one dimentional array that you want (the question is a bit unclear about that):