Skip to main content
.NET Framework Class Library
CompareInfo..::.Compare Method





Compares two strings.

This member is overloaded. For complete information about this member, including syntax, usage, and examples, click a name in the overload list.

Overload List
 NameDescription
Public methodCompare(String, String)Compares two strings.
Public methodCompare(String, String, CompareOptions)Compares two strings using the specified CompareOptions value.
Public methodCompare(String, Int32, String, Int32)Compares the end section of a string with the end section of another string.
Public methodCompare(String, Int32, String, Int32, CompareOptions)Compares the end section of a string with the end section of another string using the specified CompareOptions value.
Public methodCompare(String, Int32, Int32, String, Int32, Int32)Compares a section of one string with a section of another string.
Public methodCompare(String, Int32, Int32, String, Int32, Int32, CompareOptions)Compares a section of one string with a section of another string using the specified CompareOptions value.
Top
Microsoft is conducting an online survey to understand your opinion of the MSDN Web site. If you choose to participate, the online survey will be presented to you when you leave the MSDN Web site.

Would you like to participate?