Click here to Skip to main content
15,897,891 members
Home / Discussions / C#
   

C#

 
GeneralRe: Objects created in a loop - definition name Pin
DSLoginYea6-Aug-13 9:28
DSLoginYea6-Aug-13 9:28 
GeneralRe: Objects created in a loop - definition name Pin
nick.j.s6-Aug-13 10:51
nick.j.s6-Aug-13 10:51 
GeneralRe: Objects created in a loop - definition name Pin
DSLoginYea6-Aug-13 10:55
DSLoginYea6-Aug-13 10:55 
GeneralRe: Objects created in a loop - definition name Pin
Dave Kreskowiak6-Aug-13 10:59
mveDave Kreskowiak6-Aug-13 10:59 
GeneralRe: Objects created in a loop - definition name Pin
Dave Kreskowiak6-Aug-13 10:59
mveDave Kreskowiak6-Aug-13 10:59 
AnswerRe: Objects created in a loop - definition name Pin
Jean A Brandelero8-Aug-13 10:43
Jean A Brandelero8-Aug-13 10:43 
QuestionWah Wah effect for guitar Pin
paulera6-Aug-13 1:52
paulera6-Aug-13 1:52 
AnswerRe: Wah Wah effect for guitar Pin
Ravi Bhavnani6-Aug-13 6:02
professionalRavi Bhavnani6-Aug-13 6:02 
GeneralRe: Wah Wah effect for guitar Pin
paulera6-Aug-13 8:21
paulera6-Aug-13 8:21 
AnswerRe: Wah Wah effect for guitar Pin
MarkRHolbrook11-Aug-13 4:04
MarkRHolbrook11-Aug-13 4:04 
GeneralAdding digital signature in Crystal report pdf Pin
gandhipurvi6-Aug-13 0:25
gandhipurvi6-Aug-13 0:25 
GeneralRe: Adding digital signature in Crystal report pdf Pin
Ennis Ray Lynch, Jr.6-Aug-13 2:55
Ennis Ray Lynch, Jr.6-Aug-13 2:55 
QuestionDatetime parsing Pin
ExcellentOrg5-Aug-13 21:58
ExcellentOrg5-Aug-13 21:58 
AnswerRe: Datetime parsing Pin
Richard MacCutchan5-Aug-13 22:58
mveRichard MacCutchan5-Aug-13 22:58 
GeneralRe: Datetime parsing Pin
ExcellentOrg5-Aug-13 23:30
ExcellentOrg5-Aug-13 23:30 
AnswerRe: Datetime parsing Pin
Richard MacCutchan6-Aug-13 0:04
mveRichard MacCutchan6-Aug-13 0:04 
GeneralRe: Datetime parsing Pin
ExcellentOrg6-Aug-13 9:19
ExcellentOrg6-Aug-13 9:19 
AnswerRe: Datetime parsing Pin
Richard MacCutchan6-Aug-13 0:09
mveRichard MacCutchan6-Aug-13 0:09 
GeneralRe: Datetime parsing Pin
ExcellentOrg6-Aug-13 9:10
ExcellentOrg6-Aug-13 9:10 
AnswerRe: Datetime parsing Pin
Mycroft Holmes6-Aug-13 12:56
professionalMycroft Holmes6-Aug-13 12:56 
GeneralRe: Datetime parsing Pin
ExcellentOrg6-Aug-13 18:52
ExcellentOrg6-Aug-13 18:52 
Mycroft Holmes wrote:
I would address this a different way, assuming each stream is identifiable and is internally consistent, I would register a format for each source.


They are consistent in a sense that if mm was before dd, it does seem to remain that way ... but I'd be in trouble if I assume that it will always be slash / between characters. Sometimes it is dash or space too. So, I weed out all unwanted characters using String.Replace and replace them with what slashes as I have
'em on my format string before even attempting to parse the date.

Further, I do have custom attribute defined for each and every date/time field which essentially leads to one of the eight format strings as "tryFirstFormat". So, yes! I do have one format registered for each field although I know that expecting it to remain consistent is a bit-too-much at this point in time....

In the code, before the loop, I use parseExact to parse the date. Naturally that too is in its own try-catch block. Only if that fails, code will enter the loop.

I did not post all of the above code assuming that more code will confuse people and felt that it was not relevant to problem. But it seems from the early responses that partial code is confusing ppl more.

modified 7-Aug-13 1:02am.

AnswerRe: Datetime parsing Pin
ExcellentOrg7-Aug-13 7:57
ExcellentOrg7-Aug-13 7:57 
QuestionHow to convert string to form object in c# window application Pin
susanna.floora5-Aug-13 21:37
susanna.floora5-Aug-13 21:37 
AnswerRe: How to convert string to form object in c# window application Pin
ExcellentOrg5-Aug-13 22:34
ExcellentOrg5-Aug-13 22:34 
AnswerRe: How to convert string to form object in c# window application Pin
Rizny Mubarak5-Aug-13 23:43
Rizny Mubarak5-Aug-13 23:43 

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.