public double[,] GenRanArray(int nbOfRows, int nbOfCols)
{
int MIN_NUMBER = 0;
int MAX_NUMBER = 200; //Max of picture box
// Declare the randomNumber object: randomNumber
Random randomNumber = new Random();
// -----------------------------------
// Create our dynamic array using values passed in.
double[,] newarray = new double[nbOfRows, nbOfCols];
// Initialize the array with random numbers
for (int row = 0; row<nbOfRows; row++)
for (int col = 0; col<nbOfCols; col++)
newarray[row, col] = randomNumber.Next(MIN_NUMBER, MAX_NUMBER);
// Return the array to caller
return newarray;
}
i have to generate array values by picture box size or bitmap image size after that i fill the colors for the bitmap by the pixel values on each pixel.