Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ GetString() [2/2]

virtual ? string System.Resources.ResourceSet.GetString ( string name,
bool ignoreCase )
inlinevirtual

Reimplemented in System.Resources.RuntimeResourceSet.

Definition at line 112 of file ResourceSet.cs.

113 {
114 object objectInternal = GetObjectInternal(name);
115 if (objectInternal is string result)
116 {
117 return result;
118 }
119 if (objectInternal != null)
120 {
121 throw new InvalidOperationException(SR.Format(SR.InvalidOperation_ResourceNotString_Name, name));
122 }
123 if (!ignoreCase)
124 {
125 return null;
126 }
128 if (objectInternal is string result2)
129 {
130 return result2;
131 }
132 if (objectInternal == null)
133 {
134 return null;
135 }
136 throw new InvalidOperationException(SR.Format(SR.InvalidOperation_ResourceNotString_Name, name));
137 }
object GetObjectInternal(string name)
object GetCaseInsensitiveObjectInternal(string name)

References System.SR.Format(), System.Resources.ResourceSet.GetCaseInsensitiveObjectInternal(), System.Resources.ResourceSet.GetObjectInternal(), and System.SR.InvalidOperation_ResourceNotString_Name.