[C#] ForEach loop with Object
#1

// Fixxed..

This problem left:

for (int y = 0; y < klasse.UserID; y++)
{

}

 

Error is : the operator "<" can not be applied to operands of type 'int' and 'object'

#2

Maybe klasse.UserID is a object?

try with casting it

 

for(int y=0; y

#3

the userID is an object because of the mysql result^^

 

casting dont work too this error appears: Object reference not set to an instance of an object.



Forum Jump:


Users browsing this thread: 1 Guest(s)