Can anyone tell me ???.How should I make the attached Method in C# ???.Let me know The Idea .Any help would be highly appreciated !!!.:(
Printable View
Can anyone tell me ???.How should I make the attached Method in C# ???.Let me know The Idea .Any help would be highly appreciated !!!.:(
Is that what you want?Code:private void Method()
{
int x = int.Parse(txtNoOfPumps.Text);
if (x == Properties.Settings.Default.NoOfPumps) //Assuming NoOfPumps is a digit if not
{ //change int x to string x and get rid of the int.Parse
FillXNumberOfGrids();
}
}
i am talking about FillXNumberOfGrids() !!!. How should i write the fillxNumerofGrids() Method ???.:(Quote:
Is that what you want?
There is no way to solve your problem unless we know the logic behind that method.
you tell me that this error message is not clear enough? http://www.codeguru.com/forum/images/smilies/sick.gif have you read the documentation of TryParse at all?
this is a joke, isn't it? how did you come up to write such nonsense? I doubt in your programming skills.
and why on earth are using this stupid comic font all the time? this is the last time I read your posts if you don't stop using it.
EDIT: link corrected
This is still not working .here is the following code What I have written !!!.
:(Code:X = Int32.TryParse(txtNoOfPumps.Text,outint X);
But i need to fill Rows upto No of X times ??
Kindly find the attachment also.Thx in Advance !!!.
:(Code:privatevoid CreateStockRows() {
int X;
bool Result = int.TryParse(txtNoOfPumps.Text, out X);
if (Result==true){
for (int i = 1; i <= X; i++){
// grdPumps.Rows[i];
}
}
}