TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Suman Raj
NA
287
13.5k
Generate array values by max picturebox size
Nov 7 2018 12:59 AM
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.
Reply
Answers (
1
)
Need Clarification on Instance in C#
To convert aspx page to pdf