标签:type-constraints
-
C#不能使`notnull`类型为可空 - c#
我正在尝试创建类似于Rust的Result或Haskell的Either的类型,到目前为止,我已经做到了: public struct Result<TResult, TError> where TResult : notnull where TError : notnull { private readonly OneOf<TResult […]
我正在尝试创建类似于Rust的Result或Haskell的Either的类型,到目前为止,我已经做到了: public struct Result<TResult, TError> where TResult : notnull where TError : notnull { private readonly OneOf<TResult […]