LANGUAGE
unmanaged constraint
Requires a non-nullable unmanaged type, including structs composed solely of unmanaged fields.
Formal Syntax & Structure
csharp syntaxcsharp
where T : unmanagedWorking Example
Example Snippetcsharp
static T Keep<T>(T value) where T : unmanaged => value;