This commit is contained in:
parent
aaf0287b3a
commit
d1f9a38518
2 changed files with 3 additions and 5 deletions
|
|
@ -32,10 +32,6 @@ namespace Server
|
||||||
get{ return m_Comparer; }
|
get{ return m_Comparer; }
|
||||||
}
|
}
|
||||||
|
|
||||||
private Insensitive()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public static int Compare( string a, string b )
|
public static int Compare( string a, string b )
|
||||||
{
|
{
|
||||||
return m_Comparer.Compare( a, b );
|
return m_Comparer.Compare( a, b );
|
||||||
|
|
|
||||||
|
|
@ -1149,9 +1149,11 @@ namespace Server
|
||||||
if ( s == null )
|
if ( s == null )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
Type type = typeof(T);
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
value = (T)Enum.Parse( typeof( T ), s, true );
|
value = (T)Enum.Parse(type, s, true);
|
||||||
//TODO: On .NET 4.0, use Enum.TryParse
|
//TODO: On .NET 4.0, use Enum.TryParse
|
||||||
}
|
}
|
||||||
catch
|
catch
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue