this is where it shows the error is but in VsStudio it shows no issues.
Asked
Active
Viewed 155 times
1 Answers
1
for simple solution just make sure by check these variable is not null before execution job, data, job.rigStates, data.rigStates
because sometime the variable may be empty or null
For example
int jobLength = 0, dataLength = 0;
if(job != null && job.rigStates != null){
jobLength = job.rigStates.Length;
}
if(data!= null && data.rigStates != null){
dataLength = data.rigStates.Length;
}
// you statement
int count = Math.min(jobLength, dataLength);

さんですVaya
- 176
- 4
-
Might prevent the exception but also hide an underlying implementation/design issue ;) – derHugo Dec 06 '20 at 15:02