C# Programming
03-09-2013, 11:10 PM
Hello,
I have couple of question about if statement.
When I create password verifying program,
at least 8 characters long is
if (password.Length < 8)
valid = false;
like this, right?
Then, how can I make program that must contain at least one digit and one uppercase for the password.
Then, I tried to create
while (valid && i < 1)
{
if (!Char.IsLetter(custID[i]))
valid = false;
i++;
}
like this, but it's not working.
Please tell me.
I have couple of question about if statement.
When I create password verifying program,
at least 8 characters long is
if (password.Length < 8)
valid = false;
like this, right?
Then, how can I make program that must contain at least one digit and one uppercase for the password.
Then, I tried to create
while (valid && i < 1)
{
if (!Char.IsLetter(custID[i]))
valid = false;
i++;
}
like this, but it's not working.
Please tell me.