Abhilash J A

Abhilash J A

  • NA
  • 2.4k
  • 582.7k

How to get int math.random round number?

Apr 5 2017 4:57 AM
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)