mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-19 08:30:25 +02:00
Added 'interface' and 'enum' constraints
This commit is contained in:
parent
f63b9236d0
commit
f41365a58e
8 changed files with 110 additions and 27 deletions
|
@ -18,7 +18,7 @@ namespace System
|
|||
((int32)iVal).ToString(strBuffer);
|
||||
}
|
||||
|
||||
public static Result<T> Parse<T>(StringView str, bool ignoreCase = false) where T : Enum
|
||||
public static Result<T> Parse<T>(StringView str, bool ignoreCase = false) where T : enum
|
||||
{
|
||||
var typeInst = (TypeInstance)typeof(T);
|
||||
for (var field in typeInst.GetFields())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue