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; }
|
||||
}
|
||||
|
||||
private Insensitive()
|
||||
{
|
||||
}
|
||||
|
||||
public static int Compare( string a, string b )
|
||||
{
|
||||
return m_Comparer.Compare( a, b );
|
||||
|
|
|
|||
|
|
@ -1149,9 +1149,11 @@ namespace Server
|
|||
if ( s == null )
|
||||
return false;
|
||||
|
||||
Type type = typeof(T);
|
||||
|
||||
try
|
||||
{
|
||||
value = (T)Enum.Parse( typeof( T ), s, true );
|
||||
value = (T)Enum.Parse(type, s, true);
|
||||
//TODO: On .NET 4.0, use Enum.TryParse
|
||||
}
|
||||
catch
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue