Click here to Skip to main content
15,922,894 members
Home / Discussions / C#
   

C#

 
GeneralRe: More articles in C# than VB.net Pin
Paul Conrad15-Feb-08 12:39
professionalPaul Conrad15-Feb-08 12:39 
GeneralRe: More articles in C# than VB.net Pin
Kevin McFarlane15-Feb-08 10:29
Kevin McFarlane15-Feb-08 10:29 
GeneralRe: More articles in C# than VB.net Pin
Christian Graus15-Feb-08 10:38
protectorChristian Graus15-Feb-08 10:38 
GeneralRe: More articles in C# than VB.net Pin
Kevin McFarlane15-Feb-08 10:47
Kevin McFarlane15-Feb-08 10:47 
GeneralRe: More articles in C# than VB.net Pin
Pete O'Hanlon15-Feb-08 11:12
mvePete O'Hanlon15-Feb-08 11:12 
GeneralRe: More articles in C# than VB.net Pin
Eslam Afifi15-Feb-08 22:23
Eslam Afifi15-Feb-08 22:23 
GeneralRe: More articles in C# than VB.net Pin
Ravenet16-Feb-08 2:06
Ravenet16-Feb-08 2:06 
GeneralSystem.StringComparer and IgnoreCase Pin
PIEBALDconsult15-Feb-08 7:43
mvePIEBALDconsult15-Feb-08 7:43 
I'm working on a method and I want to allow the user to pass in a System.StringComparer, but I also want to determine whether or not that System.StringComparer is case sensitive.

System.StringComparer has an _ignoreCase member but it's private (Microsoft! Gimme a property!)

So I was thinking of doing:

C#
ignorecase = 
(
    EqualityComparer.Equals 
    ( 
        System.StringComparer.CurrentCultureIgnoreCase 
    )    
    ||
    EqualityComparer.Equals 
    ( 
        System.StringComparer.InvariantCultureIgnoreCase
    )    
    ||
    EqualityComparer.Equals 
    ( 
        System.StringComparer.OrdinalIgnoreCase
    )    
) ;


but that would need to be maintained as comparers are added and removed.

Then it occured to me that:

C#
ignorecase = ( EqualityComparer.Compare ( "X" , "x" ) == 0 ) ;


should work, and preliminary tests confirm this.


Does anyone have a more robust method of determining whether or not a System.StringComparer is case-sensitive?
GeneralRe: System.StringComparer and IgnoreCase Pin
Judah Gabriel Himango15-Feb-08 9:28
sponsorJudah Gabriel Himango15-Feb-08 9:28 
GeneralRe: System.StringComparer and IgnoreCase Pin
Not Active15-Feb-08 11:08
mentorNot Active15-Feb-08 11:08 
GeneralRe: System.StringComparer and IgnoreCase Pin
Daniel Grunwald16-Feb-08 11:15
Daniel Grunwald16-Feb-08 11:15 
GeneralRe: System.StringComparer and IgnoreCase Pin
PIEBALDconsult18-Feb-08 11:27
mvePIEBALDconsult18-Feb-08 11:27 
GeneralProblems sending bulk e-mails using system.net.mail Pin
Fatbuddha215-Feb-08 6:20
Fatbuddha215-Feb-08 6:20 
GeneralRe: Problems sending bulk e-mails using system.net.mail Pin
led mike15-Feb-08 6:24
led mike15-Feb-08 6:24 
GeneralRe: Problems sending bulk e-mails using system.net.mail Pin
Fatbuddha215-Feb-08 6:26
Fatbuddha215-Feb-08 6:26 
GeneralRe: Problems sending bulk e-mails using system.net.mail Pin
Dave Kreskowiak15-Feb-08 6:33
mveDave Kreskowiak15-Feb-08 6:33 
GeneralRe: Problems sending bulk e-mails using system.net.mail Pin
Fatbuddha215-Feb-08 6:39
Fatbuddha215-Feb-08 6:39 
GeneralRe: Problems sending bulk e-mails using system.net.mail Pin
led mike15-Feb-08 7:09
led mike15-Feb-08 7:09 
GeneralRe: Problems sending bulk e-mails using system.net.mail Pin
Fatbuddha215-Feb-08 7:16
Fatbuddha215-Feb-08 7:16 
GeneralRe: Problems sending bulk e-mails using system.net.mail Pin
led mike15-Feb-08 7:25
led mike15-Feb-08 7:25 
GeneralRe: Problems sending bulk e-mails using system.net.mail Pin
Fatbuddha217-Feb-08 8:37
Fatbuddha217-Feb-08 8:37 
GeneralRe: Problems sending bulk e-mails using system.net.mail Pin
Luc Pattyn15-Feb-08 10:03
sitebuilderLuc Pattyn15-Feb-08 10:03 
GeneralRe: Problems sending bulk e-mails using system.net.mail Pin
Skippums15-Feb-08 6:30
Skippums15-Feb-08 6:30 
GeneralRe: Problems sending bulk e-mails using system.net.mail Pin
Fatbuddha215-Feb-08 6:36
Fatbuddha215-Feb-08 6:36 
GeneralRe: Problems sending bulk e-mails using system.net.mail Pin
Skippums15-Feb-08 7:57
Skippums15-Feb-08 7:57 

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.