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

C#

 
GeneralRe: WCF Basics Pin
MicroVirus5-Jun-11 3:32
MicroVirus5-Jun-11 3:32 
AnswerRe: WCF Basics Pin
Ravi Bhavnani4-Jun-11 6:01
professionalRavi Bhavnani4-Jun-11 6:01 
QuestionIssue with StrCmpLogicalW (and doubles) [modified] Pin
SledgeHammer013-Jun-11 8:22
SledgeHammer013-Jun-11 8:22 
AnswerRe: Issue with StrCmpLogicalW (and doubles) Pin
SledgeHammer013-Jun-11 8:27
SledgeHammer013-Jun-11 8:27 
AnswerRe: Issue with StrCmpLogicalW (and doubles) Pin
gavindon3-Jun-11 10:25
gavindon3-Jun-11 10:25 
AnswerRe: Issue with StrCmpLogicalW (and doubles) Pin
gavindon3-Jun-11 10:27
gavindon3-Jun-11 10:27 
GeneralRe: Issue with StrCmpLogicalW (and doubles) Pin
SledgeHammer013-Jun-11 11:12
SledgeHammer013-Jun-11 11:12 
AnswerRe: Issue with StrCmpLogicalW (and doubles) PinPopular
Luc Pattyn3-Jun-11 15:24
sitebuilderLuc Pattyn3-Jun-11 15:24 
StrCmpLogicalW() is what Windows Explorer uses to sort file names in the "logical" order, i.e. it gives
a1a, a2a, a3a, ..., a9a, a10a, a11a, ...
so it looks at a string as containing digits and non-digits; in scans left-to-rigth; for the non-digits it compares a character at a time, by char value; for digits, it calculates the integer value and compares that. It does not know about decimal points, thousand separators, minus signs, etc.

As a result 0.842264196854649 is the number zero, a period, and the number 842264196854649, and the latter one is larger than 91145355364217 by about a factor of 9.

You should not use StrCmpLogicalW() here; why don't you just use string.Compare() (OK for positive numbers only!)? and of course, the clean approach would be using numbers, not strings.

Smile | :)
Luc Pattyn [My Articles] Nil Volentibus Arduum
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Please use <PRE> tags for code snippets, they improve readability.
CP Vanity has been updated to V2.3

GeneralRe: Issue with StrCmpLogicalW (and doubles) Pin
SledgeHammer013-Jun-11 16:08
SledgeHammer013-Jun-11 16:08 
AnswerRe: Issue with StrCmpLogicalW (and doubles) Pin
Luc Pattyn3-Jun-11 16:30
sitebuilderLuc Pattyn3-Jun-11 16:30 
QuestionAsynchronous TcpListener and TcpClient design patterns Pin
Chesnokov Yuriy3-Jun-11 6:56
professionalChesnokov Yuriy3-Jun-11 6:56 
AnswerRe: Asynchronous TcpListener and TcpClient design patterns Pin
Ravi Bhavnani3-Jun-11 7:22
professionalRavi Bhavnani3-Jun-11 7:22 
AnswerRe: Asynchronous TcpListener and TcpClient design patterns Pin
Chesnokov Yuriy3-Jun-11 7:40
professionalChesnokov Yuriy3-Jun-11 7:40 
AnswerRe: Asynchronous TcpListener and TcpClient design patterns Pin
Eddy Vluggen3-Jun-11 8:10
professionalEddy Vluggen3-Jun-11 8:10 
AnswerRe: Asynchronous TcpListener and TcpClient design patterns Pin
Chesnokov Yuriy3-Jun-11 8:28
professionalChesnokov Yuriy3-Jun-11 8:28 
GeneralRe: Asynchronous TcpListener and TcpClient design patterns Pin
Ravi Bhavnani3-Jun-11 9:15
professionalRavi Bhavnani3-Jun-11 9:15 
QuestionRe: Asynchronous TcpListener and TcpClient design patterns Pin
Chesnokov Yuriy3-Jun-11 9:47
professionalChesnokov Yuriy3-Jun-11 9:47 
AnswerRe: Asynchronous TcpListener and TcpClient design patterns Pin
Ravi Bhavnani3-Jun-11 9:58
professionalRavi Bhavnani3-Jun-11 9:58 
AnswerRe: Asynchronous TcpListener and TcpClient design patterns Pin
Chesnokov Yuriy3-Jun-11 19:32
professionalChesnokov Yuriy3-Jun-11 19:32 
GeneralRe: Asynchronous TcpListener and TcpClient design patterns Pin
Ravi Bhavnani4-Jun-11 6:00
professionalRavi Bhavnani4-Jun-11 6:00 
AnswerRe: Asynchronous TcpListener and TcpClient design patterns Pin
Eddy Vluggen3-Jun-11 9:18
professionalEddy Vluggen3-Jun-11 9:18 
AnswerRe: Asynchronous TcpListener and TcpClient design patterns Pin
BobJanova5-Jun-11 23:59
BobJanova5-Jun-11 23:59 
QuestionBroken DLL Pin
musefan3-Jun-11 5:53
musefan3-Jun-11 5:53 
AnswerRe: Broken DLL Pin
Ennis Ray Lynch, Jr.3-Jun-11 6:07
Ennis Ray Lynch, Jr.3-Jun-11 6:07 
GeneralRe: Broken DLL Pin
musefan3-Jun-11 6:18
musefan3-Jun-11 6:18 

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.