المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : Operator '==' cannot be applied to operands of type 'string' and 'int'



C# Programming
01-13-2012, 05:57 AM
hi..
am new to c#..
am getting an error below code..wch is wrking fine with Vb..
int legseq = 0; if (legseq == " ") { legseq = 0; }
Error: Operator '==' cannot be applied to operands of type 'string' and 'int' I dont want to use 'null'instaed off " ". and dont want to make int as nullable. can anybdy help?

Regrds,
Reta