Click here to Skip to main content
15,899,754 members
Home / Discussions / C#
   

C#

 
AnswerRe: Difference between Array and Loop. Pin
PIEBALDconsult23-Jan-15 3:24
mvePIEBALDconsult23-Jan-15 3:24 
GeneralRe: Difference between Array and Loop. Pin
nagendrathecoder23-Jan-15 4:05
nagendrathecoder23-Jan-15 4:05 
AnswerRe: Difference between Array and Loop. Pin
LLLLGGGG23-Jan-15 10:52
LLLLGGGG23-Jan-15 10:52 
QuestionWhy does the callback method of an EventHandler<T> need to be static? Pin
TMattC22-Jan-15 22:38
TMattC22-Jan-15 22:38 
QuestionRe: Why does the callback method of an EventHandler<T> need to be static? Pin
Richard Deeming22-Jan-15 23:34
mveRichard Deeming22-Jan-15 23:34 
AnswerRe: Why does the callback method of an EventHandler<T> need to be static? Pin
TMattC22-Jan-15 23:56
TMattC22-Jan-15 23:56 
GeneralRe: Why does the callback method of an EventHandler<T> need to be static? Pin
Eddy Vluggen23-Jan-15 0:35
professionalEddy Vluggen23-Jan-15 0:35 
QuestionDeleted Files path from HardDisk ( FAT / NTFS ) in C# Pin
Member 1139660822-Jan-15 22:35
Member 1139660822-Jan-15 22:35 
AnswerRe: Deleted Files path from HardDisk ( FAT / NTFS ) in C# Pin
OriginalGriff23-Jan-15 0:26
mveOriginalGriff23-Jan-15 0:26 
GeneralRe: Deleted Files path from HardDisk ( FAT / NTFS ) in C# Pin
deepankarbhatnagar23-Jan-15 1:17
professionaldeepankarbhatnagar23-Jan-15 1:17 
GeneralRe: Deleted Files path from HardDisk ( FAT / NTFS ) in C# Pin
Pete O'Hanlon23-Jan-15 2:59
mvePete O'Hanlon23-Jan-15 2:59 
QuestionEncrypting String Pin
EricSouthman22-Jan-15 21:59
EricSouthman22-Jan-15 21:59 
AnswerRe: Encrypting String Pin
V.22-Jan-15 22:39
professionalV.22-Jan-15 22:39 
AnswerRe: Encrypting String Pin
Eddy Vluggen23-Jan-15 0:33
professionalEddy Vluggen23-Jan-15 0:33 
AnswerRe: Encrypting String Pin
GuyThiebaut23-Jan-15 0:43
professionalGuyThiebaut23-Jan-15 0:43 
QuestionHow can I clear a file's content? Pin
kidult22-Jan-15 18:10
kidult22-Jan-15 18:10 
AnswerRe: How can I clear a file's content? Pin
Wendelius22-Jan-15 18:19
mentorWendelius22-Jan-15 18:19 
GeneralRe: How can I clear a file's content? Pin
kidult22-Jan-15 21:06
kidult22-Jan-15 21:06 
GeneralRe: How can I clear a file's content? Pin
Wendelius23-Jan-15 2:42
mentorWendelius23-Jan-15 2:42 
Questionc# validation Pin
Member 1135438622-Jan-15 13:51
Member 1135438622-Jan-15 13:51 
GeneralRe: c# validation Pin
PIEBALDconsult22-Jan-15 14:33
mvePIEBALDconsult22-Jan-15 14:33 
GeneralRe: c# validation Pin
Member 1135438622-Jan-15 17:17
Member 1135438622-Jan-15 17:17 
AnswerRe: c# validation Pin
Mycroft Holmes22-Jan-15 15:51
professionalMycroft Holmes22-Jan-15 15:51 
GeneralRe: c# validation Pin
Member 1135438622-Jan-15 17:15
Member 1135438622-Jan-15 17:15 
GeneralRe: c# validation Pin
PIEBALDconsult22-Jan-15 18:42
mvePIEBALDconsult22-Jan-15 18:42 
Member 11354386 wrote:
must be monday tuesday wednedsay thursday or friday


I would probably just use a Hashset with a case-insensitive comparer, add the valid values, and then test for Contains.
Another option would be to use an enumeration and try Parsing the value.



See also: Dictionary&lt;string,T&gt;.BestMatch[^]

And remember that your teacher will likely know what you are capable of and will know if you turn in code you didn't write yourself, so take any ideas you may encounter and write your own solution.

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.