Return to Snippet

Revision: 30045
at August 6, 2010 13:59 by stewshack


Initial Code
string DeathStar = "That's no moon";
            
// Here's the best way to compare strings.
// http://msdn.microsoft.com/en-us/library/ms973919.aspx

if (string.Compare(DeathStar, "THAT'S NO MOON", 
    StringComparison.OrdinalIgnoreCase) == 0)
{
    Wookie Chewie = new Wookie();
    Chewie.GetUsOuttaHere();
}

Initial URL

                                

Initial Description

                                

Initial Title
String Comparison C#

Initial Tags
Net

Initial Language
C#