Click here to Skip to main content
15,902,114 members
Home / Discussions / C#
   

C#

 
Questionis it possible for an hacker make this: Pin
Anonymous21-Oct-05 6:30
Anonymous21-Oct-05 6:30 
AnswerRe: is it possible for an hacker make this: Pin
Kythen21-Oct-05 8:04
Kythen21-Oct-05 8:04 
GeneralRe: is it possible for an hacker make this: Pin
Sasuko21-Oct-05 12:55
Sasuko21-Oct-05 12:55 
QuestionLoading thumbnails in listview.....faster way? Pin
abcxyz8221-Oct-05 6:29
abcxyz8221-Oct-05 6:29 
AnswerRe: Loading thumbnails in listview.....faster way? Pin
Douglas Troy21-Oct-05 6:42
Douglas Troy21-Oct-05 6:42 
AnswerRe: Loading thumbnails in listview.....faster way? Pin
Libor Tinka21-Oct-05 6:44
Libor Tinka21-Oct-05 6:44 
QuestionCheck valid XML element name. Pin
Libor Tinka21-Oct-05 6:12
Libor Tinka21-Oct-05 6:12 
AnswerRe: Check valid XML element name. Pin
whizzs21-Oct-05 10:57
whizzs21-Oct-05 10:57 
I'm not sure about a validate function, but you could do it this way:

using System.Text.RegularExpressions;
.
.
.
// reg ex to validate an XML element name

Regex reg = new Regex ( @"^(?!xml)[a-zA-Z]\w+$", RegexOptions.IgnoreCase );

if ( reg.IsMatch ( "STRING TO CHECK" ) )
{
// do something with it
}

I did not verify the regular expression string against all possible errors (malformed element names), but you should be able to correct any mistakes or add characters that you want to be valid. I don't like to use anything other than what is already there.

Hope this helps
AnswerRe: Check valid XML element name. Pin
leppie21-Oct-05 12:31
leppie21-Oct-05 12:31 
QuestionLittle Red 'X' on MDI Pin
Dwayner7921-Oct-05 5:12
Dwayner7921-Oct-05 5:12 
AnswerRe: Little Red 'X' on MDI Pin
Libor Tinka21-Oct-05 6:16
Libor Tinka21-Oct-05 6:16 
GeneralRe: Little Red 'X' on MDI Pin
Dwayner7921-Oct-05 7:37
Dwayner7921-Oct-05 7:37 
QuestionBeginner Help: Unassigned local variable Pin
ivelander21-Oct-05 4:19
ivelander21-Oct-05 4:19 
AnswerRe: Beginner Help: Unassigned local variable Pin
Member 114619621-Oct-05 4:34
Member 114619621-Oct-05 4:34 
GeneralRe: Beginner Help: Unassigned local variable Pin
ivelander21-Oct-05 4:41
ivelander21-Oct-05 4:41 
GeneralRe: Beginner Help: Unassigned local variable Pin
Matt Gerrans21-Oct-05 16:08
Matt Gerrans21-Oct-05 16:08 
AnswerRe: Beginner Help: Unassigned local variable Pin
Tom Larsen21-Oct-05 4:58
Tom Larsen21-Oct-05 4:58 
AnswerRe: Beginner Help: Unassigned local variable Pin
whizzs21-Oct-05 11:07
whizzs21-Oct-05 11:07 
QuestionWriting a Trailware for an Application Pin
Samar Aarkotti21-Oct-05 4:18
Samar Aarkotti21-Oct-05 4:18 
AnswerRe: Writing a Trailware for an Application Pin
Tom Larsen21-Oct-05 4:54
Tom Larsen21-Oct-05 4:54 
GeneralRe: Writing a Trailware for an Application Pin
Samar Aarkotti21-Oct-05 5:22
Samar Aarkotti21-Oct-05 5:22 
GeneralRe: Writing a Trailware for an Application Pin
Tom Larsen21-Oct-05 8:09
Tom Larsen21-Oct-05 8:09 
GeneralRe: Writing a Trailware for an Application Pin
Samar Aarkotti21-Oct-05 8:26
Samar Aarkotti21-Oct-05 8:26 
GeneralRe: Writing a Trailware for an Application Pin
Tom Larsen21-Oct-05 10:55
Tom Larsen21-Oct-05 10:55 
GeneralRe: Writing a Trailware for an Application Pin
Samar Aarkotti22-Oct-05 6:06
Samar Aarkotti22-Oct-05 6:06 

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.