Beispiel #1
0
    public static string Get(string format, string value1, string value2, string value3, string value4)
    {
        string str;

        StringFormatCache.Key4 key4 = new StringFormatCache.Key4(format, value1, value2, value3, value4);
        if (!StringFormatCache.dict4.TryGetValue(key4, out str))
        {
            str = string.Format(format, new object[] { value1, value2, value3, value4 });
            StringFormatCache.dict4.Add(key4, str);
        }
        return(str);
    }
Beispiel #2
0
    public static string Get(
        string format,
        string value1,
        string value2,
        string value3,
        string value4)
    {
        StringFormatCache.Key4 key = new StringFormatCache.Key4(format, value1, value2, value3, value4);
        string str;

        if (!StringFormatCache.dict4.TryGetValue(key, out str))
        {
            str = string.Format(format, (object)value1, (object)value2, (object)value3, (object)value4);
            StringFormatCache.dict4.Add(key, str);
        }
        return(str);
    }