0 votes
in Dot Net by
recategorized by
Disposable ref structs in C#

1 Answer

0 votes
by

struct declared with the ref modifier may not implement any interfaces and so can't implement IDisposable. Therefore, to enable a ref struct to be disposed, it must have an accessible void Dispose() method. This feature also applies to readonly ref struct declarations.

...