1
Vote

Handle resource loading error

description

internal static string GetString(string key, object[] args)
        {
            string msg = resourceManager.GetString(key, _culture);
            msg = string.Format(msg, args);
            return msg;
        }
 
Handle situation when msg is null - throw(string.Format("SRT2 generated class {0}: resoure '{1}' is not found", this.Type.FullName, key));
 
Handle situation when msg = string.Format(msg, args) failed because of wrong number of arguments. Throw exception or just return msg as is, without inserts - that is a question

comments