Hi Everyone,
This is Mini and I am a beginner in C#.
Was trying out some code something like :
do
{
XXX...
}
while (ch != 'Y' || ch !='y');
where ch is a character data type.
The problem is with this condition the loop goes infinite and not come out when passing value = 'Y' or 'y'.
Then read that logical OR works only with int and enum. Then with implicit type cast to int I tried but the result was same
Please help and guide me how I can establish this condition.
Thanks
Mini
This is Mini and I am a beginner in C#.
Was trying out some code something like :
do
{
XXX...
}
while (ch != 'Y' || ch !='y');
where ch is a character data type.
The problem is with this condition the loop goes infinite and not come out when passing value = 'Y' or 'y'.
Then read that logical OR works only with int and enum. Then with implicit type cast to int I tried but the result was same
Please help and guide me how I can establish this condition.
Thanks
Mini