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

C#

 
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 
AnswerRe: How to use RegEx for AlphaNumeric expressions Pin
Dave Kreskowiak28-Nov-17 10:49
mveDave Kreskowiak28-Nov-17 10:49 
The * in that RegEx means "any number of, including 0". It doesn't mean "exactly 4".

To get an exact 4 characters, you would have to use a RegEx pattern of "^[a-zA-Z0-9]{4}$".

You don't need that for loop at all.

As for the rest, I have no idea what this code is supposed to be doing. It's not named properly and doesn't return a value soooooo....

I would probably rename the method
C#
public bool IsValidId(string text)

and have it return a true/false value that indicates if the passed in value is a valid Id number, according to your new RegEx pattern.
System.ItDidntWorkException: Something didn't work as expected.

C# - How to debug code[^].
Seriously, go read these articles.

Dave Kreskowiak

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 
GeneralRe: how to get programmatically the selected item of a treeview dynamically built Pin
Gerry Schmitz27-Nov-17 8:12
mveGerry Schmitz27-Nov-17 8:12 

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.