This commit is contained in:
asayre 2010-10-20 01:09:57 +00:00
parent aaf0287b3a
commit d1f9a38518
2 changed files with 3 additions and 5 deletions

View file

@ -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