Was this page helpful?

CompareInvariant Extension Method

    CompareInvariant(this string left, string right, bool ignoreCase)

    public static int CompareInvariant(this string left, string right, bool ignoreCase);
    Shortcut for invariant String.Compare(string strA, string strB)

    Parameters

    Name Type Description
    left string Left-hand string to compare.
    right string Right-hand string to compare.
    ignoreCase bool True if case should not be considered in comparison.

    Returns

    Type: int
    A 32-bit signed integer indicating the lexical relationship between the two comparands. Value Condition Less than zero left is less than right. Zero left equals right. Greater than zero left is greater than right.

    CompareInvariant(this string left, string right)

    public static int CompareInvariant(this string left, string right);
    Shortcut for invariant String.Compare(string strA, string strB)

    Parameters

    Name Type Description
    left string Left-hand string to compare.
    right string Right-hand string to compare.

    Returns

    Type: int
    A 32-bit signed integer indicating the lexical relationship between the two comparands. Value Condition Less than zero left is less than right. Zero left equals right. Greater than zero left is greater than right.
    Was this page helpful?
    Tag page
    You must login to post a comment.

    Copyright © 2011 MindTouch, Inc. Powered by