Click here to Skip to main content
       

C#

 
You must Sign In to use this message board.
Search this forum  
    Spacing  Noise  Layout  Per page  Show 
AnswerRe: Suggestions: textbox background and foreground colours.memberRavi Bhavnani9 Mar '13 - 13:01 
I believe the answer lies in this[^] post.
 
/ravi
My new year resolution: 2048 x 1536
Home | Articles | My .NET bits | Freeware
ravib(at)ravib(dot)com

GeneralRe: Suggestions: textbox background and foreground colours.memberPHS2419 Mar '13 - 23:02 
Ravi,
 
Thanks for the link. I tried it and it seems to do the job okay.Thumbs Up | :thumbsup:
If there is one thing more dangerous than getting between a bear and her cubs it's getting between my wife and her chocolate.

QuestionIf statementmemberSottyoru9 Mar '13 - 7:07 
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.
AnswerRe: If statementmemberPIEBALDconsult9 Mar '13 - 7:58 
Look into String.IndexOfAny
 
http://msdn.microsoft.com/en-us/library/11w09h50.aspx[^]
AnswerRe: If statementmemberdusty_dex9 Mar '13 - 10:29 
You should be able to figure something out from the following
 
Password Strength Control
 
Regular expressions can help but they're not a silver bullet.
Q. Hey man! have you sorted out the finite soup machine?
 
A. Why yes, it's celery or tomato.

GeneralRe: If statementmemberPIEBALDconsult9 Mar '13 - 10:57 
You need to read his earlier post. It's homework.
GeneralRe: If statementmemberdusty_dex10 Mar '13 - 6:05 
Ah, yes. missed that other post. Blush | :O
 
It's his own problem if he can't be bothered to *learn* and just copies stuff.
Q. Hey man! have you sorted out the finite soup machine?
 
A. Why yes, it's celery or tomato.

AnswerRe: If statement [modified]membersource.compiler10 Mar '13 - 0:10 
hi .
if(password.Length < 8) is extreme 7 character.
at least 8 character is this :
if(7<password.Length)
//or
if(8<=password.Length)
 
but for second part of your question ... ! try to understand these codes and get some idea to mke your own .never copy and paste!(just a suggestion to improve your skills,ofcourse you are free to copy Smile | :) )
   char[] Digits = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9' };
   if (7 < password.Length)
      foreach (char t in Digits)
          if (password.Contains(t))
              for (int h = 65; h < 90; h++)
                   if (password.Contains((char)h))
                         break;//do proper operation ... .


modified 10 Mar '13 - 12:05.

GeneralRe: If statementmemberjschell10 Mar '13 - 6:19 
In C# System.Char has a number of methods including isDigit()and isLetter()
GeneralRe: If statementmembersource.compiler10 Mar '13 - 6:23 
yea , its more simple way . thanks for remind!

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   


Advertise | Privacy | Mobile
Web03 | 2.6.130523.1 | Last Updated 23 May 2013
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid