Click here to Skip to main content
15,892,005 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
QuestionEvent handling Pin
Pankaj Patel yosa20-Aug-11 2:40
Pankaj Patel yosa20-Aug-11 2:40 
AnswerRe: Event handling Pin
MicroVirus20-Aug-11 3:33
MicroVirus20-Aug-11 3:33 
Questiongadgets for desktop Pin
vannie1819-Aug-11 3:53
vannie1819-Aug-11 3:53 
AnswerRe: gadgets for desktop Pin
DaveAuld20-Aug-11 7:03
professionalDaveAuld20-Aug-11 7:03 
GeneralRe: gadgets for desktop Pin
vannie1820-Aug-11 15:01
vannie1820-Aug-11 15:01 
Questionsearch using textbox and listview in vb.net Pin
atzdgreat19-Aug-11 3:23
atzdgreat19-Aug-11 3:23 
AnswerRe: search using textbox and listview in vb.net Pin
Dave Kreskowiak19-Aug-11 4:53
mveDave Kreskowiak19-Aug-11 4:53 
QuestionString compare oddity [modified] Pin
PIEBALDconsult18-Aug-11 15:21
mvePIEBALDconsult18-Aug-11 15:21 
I was looking at sorting some strings today and noticed that the default comparer orders them wrong -- it sorts "a" before "A", rather than after it, for instance.
So I looked into it and read up a bit and tried the InvariantCulture and the Ordinal comparer -- Ordinal works correctly, and I'll likely use it, but I'm not happy about it.

According to http://msdn.microsoft.com/en-us/library/dd465121.aspx[^]:

"Comparisons that use StringComparison.InvariantCulture and StringComparison.Ordinal work identically on ASCII strings."

Which is not strictly true -- they order these differently.

Does anyone here know how to make a Culture (based on en-US) that does a case-sensitive sort the right way?




Edit: This is interesting... I was experimenting with the System.StringComparer.CurrentCultureIgnoreCase and discovered that it seems to do what I want -- at least in the tests I've made. Which is good. Thumbs Up | :thumbsup:
But that means that it doesn't actually ignore the case! Sigh | :sigh:


Scratch that -- it's just an artifact of how I was testing it.

modified on Friday, August 19, 2011 2:13 PM

AnswerRe: String compare oddity Pin
Navin Pandit18-Aug-11 19:02
Navin Pandit18-Aug-11 19:02 
GeneralRe: String compare oddity Pin
PIEBALDconsult19-Aug-11 2:42
mvePIEBALDconsult19-Aug-11 2:42 
AnswerRe: String compare oddity Pin
Shameel19-Aug-11 4:41
professionalShameel19-Aug-11 4:41 
GeneralRe: String compare oddity Pin
PIEBALDconsult19-Aug-11 5:24
mvePIEBALDconsult19-Aug-11 5:24 
GeneralRe: String compare oddity Pin
Shameel19-Aug-11 5:33
professionalShameel19-Aug-11 5:33 
GeneralRe: String compare oddity Pin
PIEBALDconsult19-Aug-11 5:45
mvePIEBALDconsult19-Aug-11 5:45 
GeneralRe: String compare oddity Pin
Shameel19-Aug-11 5:57
professionalShameel19-Aug-11 5:57 
GeneralRe: String compare oddity [modified] Pin
PIEBALDconsult19-Aug-11 6:05
mvePIEBALDconsult19-Aug-11 6:05 
GeneralRe: String compare oddity Pin
Shameel19-Aug-11 9:32
professionalShameel19-Aug-11 9:32 
GeneralRe: String compare oddity Pin
PIEBALDconsult19-Aug-11 9:58
mvePIEBALDconsult19-Aug-11 9:58 
GeneralRe: String compare oddity Pin
Shameel20-Aug-11 8:28
professionalShameel20-Aug-11 8:28 
AnswerRe: String compare oddity Pin
PIEBALDconsult19-Aug-11 20:06
mvePIEBALDconsult19-Aug-11 20:06 
Questionplz brack my licence Pin
saqibali211918-Aug-11 8:09
saqibali211918-Aug-11 8:09 
QuestionHow to execute method n-times in a second? Pin
Tesic Goran17-Aug-11 21:03
professionalTesic Goran17-Aug-11 21:03 
AnswerRe: How to execute method n-times in a second? Pin
Shameel17-Aug-11 21:55
professionalShameel17-Aug-11 21:55 
GeneralRe: How to execute method n-times in a second? Pin
Tesic Goran17-Aug-11 22:28
professionalTesic Goran17-Aug-11 22:28 
AnswerRe: How to execute method n-times in a second? Pin
Pete O'Hanlon17-Aug-11 22:13
mvePete O'Hanlon17-Aug-11 22:13 

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.