Click here to Skip to main content
15,569,408 members
Home / Discussions / C#
   

C#

 
AnswerRe: A matter of style : Switch or ?: Pin
Luc Pattyn20-Oct-09 2:53
sitebuilderLuc Pattyn20-Oct-09 2:53 
GeneralRe: A matter of style : Switch or ?: Pin
PIEBALDconsult20-Oct-09 6:49
professionalPIEBALDconsult20-Oct-09 6:49 
AnswerRe: A matter of style : Switch or ?: Pin
PIEBALDconsult20-Oct-09 6:56
professionalPIEBALDconsult20-Oct-09 6:56 
QuestionHow to lock the column width expansion in list view at run time Pin
@nisha 2n20-Oct-09 0:21
@nisha 2n20-Oct-09 0:21 
AnswerRe: How to lock the column width expansion in list view at run time Pin
Jacobb Michael20-Oct-09 2:48
Jacobb Michael20-Oct-09 2:48 
GeneralRe: How to lock the column width expansion in list view at run time Pin
SimpleData20-Oct-09 6:57
SimpleData20-Oct-09 6:57 
QuestionRegular Expression ? Pin
Jacobb Michael20-Oct-09 0:07
Jacobb Michael20-Oct-09 0:07 
AnswerRe: Regular Expression ? Pin
Eddy Vluggen20-Oct-09 2:29
professionalEddy Vluggen20-Oct-09 2:29 
I doubt that you can (correctly) deduce a regex from sample data. Take the phone-number column as an example, with this data;
555-423325
What mask would the first three five's generate, and would that mask be reusable as a phone-number-mask?

It gets worse, since the generated mask isn't a phone-number-mask (even if you base it on the data in that column) - it will be a mask that allows all data within that column (since that's what it's based on).

The best approach would be to make a list of examples for each column, containing correct and incorrect values. Next, you base the regex on the domain of the values that you expect. Lastly, a unit-test to verify that the regex works Smile | :)

I are Troll Smile | :)

GeneralRe: Regular Expression ? Pin
Jacobb Michael20-Oct-09 2:58
Jacobb Michael20-Oct-09 2:58 
GeneralRe: Regular Expression ? Pin
Eddy Vluggen20-Oct-09 3:02
professionalEddy Vluggen20-Oct-09 3:02 
GeneralRe: Regular Expression ? Pin
Jacobb Michael20-Oct-09 3:13
Jacobb Michael20-Oct-09 3:13 
GeneralRe: Regular Expression ? Pin
J4amieC20-Oct-09 3:38
J4amieC20-Oct-09 3:38 
GeneralRe: Regular Expression ? Pin
Eddy Vluggen20-Oct-09 5:41
professionalEddy Vluggen20-Oct-09 5:41 
Questionhow to design page navigation window form using back and next button Pin
@nisha 2n19-Oct-09 23:49
@nisha 2n19-Oct-09 23:49 
AnswerRe: how to design page navigation window form using back and next button Pin
Calla20-Oct-09 0:00
Calla20-Oct-09 0:00 
AnswerRe: how to design page navigation window form using back and next button Pin
Jacobb Michael20-Oct-09 0:14
Jacobb Michael20-Oct-09 0:14 
GeneralRe: how to design page navigation window form using back and next button Pin
@nisha 2n20-Oct-09 0:26
@nisha 2n20-Oct-09 0:26 
GeneralRe: how to design page navigation window form using back and next button Pin
Jacobb Michael20-Oct-09 1:47
Jacobb Michael20-Oct-09 1:47 
AnswerRe: how to design page navigation window form using back and next button Pin
stancrm20-Oct-09 0:46
stancrm20-Oct-09 0:46 
QuestionMake main window wait for message box Pin
Lee Reid19-Oct-09 23:41
Lee Reid19-Oct-09 23:41 
AnswerRe: Make main window wait for message box Pin
dan!sh 19-Oct-09 23:50
professional dan!sh 19-Oct-09 23:50 
GeneralRe: Make main window wait for message box Pin
Lee Reid19-Oct-09 23:54
Lee Reid19-Oct-09 23:54 
AnswerRe: Make main window wait for message box Pin
Mirko198019-Oct-09 23:52
Mirko198019-Oct-09 23:52 
AnswerRe: Make main window wait for message box Pin
freakyit20-Oct-09 2:29
freakyit20-Oct-09 2:29 
QuestionC# to Nassi-Shneiderman diagram Pin
Herman<T>.Instance19-Oct-09 23:27
Herman<T>.Instance19-Oct-09 23:27 

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.