+ 1

Can u use a String variable in a while loop?

I wanna make a loop with 'while' and I want to do it with a String variable in C#, is it possible?

25th Feb 2018, 11:15 AM
Benedek SzabĂł
Benedek SzabĂł - avatar
4 Answers
+ 2
Yes you can. https://code.sololearn.com/ct6GTrtngJdM/?ref=app Did this answer your question ?
25th Feb 2018, 12:03 PM
sneeze
sneeze - avatar
+ 2
Do not try to copy me. I just made the example to show you it is possible to work with strings. I think you are looking for while ( password == password1) //equal while ( password != password1) // not equal password.equals (password1)
25th Feb 2018, 1:31 PM
sneeze
sneeze - avatar
+ 1
Almost, let me show what I got: https://code.sololearn.com/cr8VCL5QG8cy/?ref=app
25th Feb 2018, 12:53 PM
Benedek SzabĂł
Benedek SzabĂł - avatar
+ 1
alright, thnx anyway:D
25th Feb 2018, 2:01 PM
Benedek SzabĂł
Benedek SzabĂł - avatar