Click here to Skip to main content
15,886,664 members
Home / Discussions / C#
   

C#

 
QuestionI am trying to create and write to a file using one boolean bit at a time. Pin
computerpublic28-Nov-17 13:17
computerpublic28-Nov-17 13:17 
GeneralRe: I am trying to create and write to a file using one boolean bit at a time. Pin
PIEBALDconsult28-Nov-17 14:21
mvePIEBALDconsult28-Nov-17 14:21 
AnswerRe: I am trying to create and write to a file using one boolean bit at a time. Pin
Sascha Lefèvre28-Nov-17 14:52
professionalSascha Lefèvre28-Nov-17 14:52 
AnswerRe: I am trying to create and write to a file using one boolean bit at a time. Pin
Gerry Schmitz29-Nov-17 4:59
mveGerry Schmitz29-Nov-17 4:59 
AnswerRe: I am trying to create and write to a file using one boolean bit at a time. Pin
________________2-Dec-17 23:37
________________2-Dec-17 23:37 
QuestionActive Directory Code Not Returning All Objects Pin
Kevin Marois28-Nov-17 12:37
professionalKevin Marois28-Nov-17 12:37 
AnswerRe: Active Directory Code Not Returning All Objects Pin
Richard Deeming30-Nov-17 8:04
mveRichard Deeming30-Nov-17 8:04 
QuestionHow to use RegEx for AlphaNumeric expressions Pin
Member 1348136128-Nov-17 8:56
Member 1348136128-Nov-17 8:56 
I'm trying to use only Alphanumeric characters an must use 4. No more or less.
The Code I'm using is below. If I remove the For Loop and can type Alphanumeric values in the textbox but I can seem to type only 4 characters. maxLenght says: cannot convert type in to bool. (Must be 4 characters). I appreciate your help.

public void AlphaNumericString()
       {

           //string value;
           string s = BacBox.Text;
           int maxLenght = 4;

           Regex r = new Regex("^[a-zA-Z0-9]*$");
           if (r.IsMatch(s))
           {
               for (int i = 0; i = maxLenght; i++)
               {

                   BacBox.Text = s;
               }

           }
           else
           {
               MessageBox.Show("Enter 4 alphanumeric characters only");
           }

AnswerRe: How to use RegEx for AlphaNumeric expressions Pin
Dave Kreskowiak28-Nov-17 10:49
mveDave Kreskowiak28-Nov-17 10:49 
AnswerRe: How to use RegEx for AlphaNumeric expressions Pin
Dave Kreskowiak28-Nov-17 10:52
mveDave Kreskowiak28-Nov-17 10:52 
AnswerRe: How to use RegEx for AlphaNumeric expressions Pin
Gerry Schmitz29-Nov-17 4:52
mveGerry Schmitz29-Nov-17 4:52 
QuestionEntity FrameWork Question Pin
Kevin Marois28-Nov-17 6:08
professionalKevin Marois28-Nov-17 6:08 
AnswerRe: Entity FrameWork Question Pin
Richard MacCutchan28-Nov-17 6:11
mveRichard MacCutchan28-Nov-17 6:11 
GeneralRe: Entity FrameWork Question Pin
Kevin Marois28-Nov-17 6:15
professionalKevin Marois28-Nov-17 6:15 
GeneralRe: Entity FrameWork Question Pin
Richard MacCutchan28-Nov-17 6:18
mveRichard MacCutchan28-Nov-17 6:18 
GeneralRe: Entity FrameWork Question Pin
Kevin Marois28-Nov-17 6:19
professionalKevin Marois28-Nov-17 6:19 
QuestionParameterized Command Not Adding To DB Pin
MsJane27-Nov-17 8:21
MsJane27-Nov-17 8:21 
AnswerRe: Parameterized Command Not Adding To DB Pin
Sascha Lefèvre27-Nov-17 8:54
professionalSascha Lefèvre27-Nov-17 8:54 
AnswerRe: Parameterized Command Not Adding To DB Pin
Richard MacCutchan27-Nov-17 22:06
mveRichard MacCutchan27-Nov-17 22:06 
AnswerRe: Parameterized Command Not Adding To DB Pin
MsJane30-Nov-17 5:13
MsJane30-Nov-17 5:13 
Questionhow to get programmatically the selected item of a treeview dynamically built Pin
Hervend27-Nov-17 2:02
Hervend27-Nov-17 2:02 
AnswerRe: how to get programmatically the selected item of a treeview dynamically built Pin
Eddy Vluggen27-Nov-17 2:21
professionalEddy Vluggen27-Nov-17 2:21 
GeneralRe: how to get programmatically the selected item of a treeview dynamically built Pin
Hervend27-Nov-17 2:56
Hervend27-Nov-17 2:56 
GeneralRe: how to get programmatically the selected item of a treeview dynamically built Pin
Eddy Vluggen27-Nov-17 3:26
professionalEddy Vluggen27-Nov-17 3:26 
GeneralRe: how to get programmatically the selected item of a treeview dynamically built Pin
Hervend27-Nov-17 19:19
Hervend27-Nov-17 19:19 

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

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.