C #은 'notnull'유형을 nullable로 만들 수 없습니다.
Rust Result또는 Haskell 과 비슷한 유형을 만들려고합니다.Either 지금까지 이것을 얻었습니다. public struct Result<TResult, TError> where TResult : notnull where TError : notnull { private readonly OneOf<TResult, TError> Value; public Result(TResult result) => Value = result; public Result(TError error) => Value = error; public static implicit operator Result<TResult, TError>(TResult result) => …