Was this page helpful?

ReplaceAll Extension Method

    ReplaceAll(this string source, params String[] replacements)

    public static string ReplaceAll(this string source, params String[] replacements);
    Replace all occurences of a number of strings.

    Parameters

    Name Type Description
    source string Source string.
    replacements params String[] Array of strings to match and their replacements. Each string to be replaced at odd index i must have a replacement value at index i+1.

    Returns

    Type: string
    String with replacements performed on it.

    ReplaceAll(this string source, StringComparison comparison, params String[] replacements)

    public static string ReplaceAll(this string source, StringComparison comparison, params String[] replacements);
    Replace all occurences of a number of strings.

    Parameters

    Name Type Description
    source string Source string.
    comparison StringComparison Type of string comparison to use.
    replacements params String[] Array of strings to match and their replacements. Each string to be replaced at odd index i must have a replacement value at index i+1.

    Returns

    Type: string
    String with replacements performed on it.
    Was this page helpful?
    Tag page
    You must login to post a comment.

    Copyright © 2011 MindTouch, Inc. Powered by