System.Globalization.FormLanguageSwitchSingleton.GetSafeValue C# (CSharp) Method

GetSafeValue() private method

Gets resource value. If resource for new culture does not exists, leaves the current.
private GetSafeValue ( System resources, string name, object currentValue ) : object
resources System
name string
currentValue object
return object
		private object GetSafeValue(System.Resources.ResourceManager resources, string name, object currentValue) {
			object newValue = resources.GetObject(name, m_cultureInfo);
			if (newValue == null) {
				Trace.WriteLine(string.Format("Resource for {0} not found, using current value.", name));
				return currentValue;
			}
			return newValue;
		}