C# 拓展string 类 不区分大小写

public static class dd11
{

    public  static string ExtensionIgoreCase(this string stuName,string cc)
    {
        stuName.Equals(cc, StringComparison.OrdinalIgnoreCase);
        return "";
    }


    public static int GetNameIndex(string name)
    {
        name.ExtensionIgoreCase("cc");
        return 1;
    }
}

你可能感兴趣的:(C#)