public static LanguageResources LoadLanaguage(string lanaguage) { LanguageResources newInstance = new LanguageResources(lanaguage); newInstance.InitFromLocalResource(lanaguage); Interlocked.Exchange <LanguageResources>(ref instance, newInstance); Interlocked.Exchange <string>(ref currentLanguage, lanaguage); return(newInstance); }
public static LanguageResources LoadLanaguage(string lanaguage) { LanguageResources newInstance = new LanguageResources(lanaguage); newInstance.InitFromLocalResource(lanaguage); Interlocked.Exchange<LanguageResources>(ref instance, newInstance); Interlocked.Exchange<string>(ref currentLanguage, lanaguage); return newInstance; }