6
Answers

How to get int math.random round number?

Mani Kandan

Mani Kandan

7y
277
1
Hi,
 
Let's say, if I want to set Math.random(); in variable.
 
 
'idPartnerProject'  model class object, some times it will cotain integer also,
 
  1.  foreach (var partnerProjecttemp in pageVM.Form5.Projects)  
  2.                 {  
  3.                     partnerProjectBL.idPartnerProject = Convert.ToInt32(partnerProjecttemp.idPartnerProject);  
  4. /*if idPartnerProject id existing then update record, not exist add a new record*/  

 
 

 And,

 

  But now error raising, Input string was not in a correct format.

 
How can I solve this?
Answers (6)