using System.Collections.Generic;
private readonly T value;
private readonly bool hasValue;
public static implicit operator Maybe<T>(T value)
return value == null ? new Maybe<T>() : new Maybe<T>(value);
private static Maybe<byte> OK()
private static Maybe<IEnumerable<byte>> NotOK()
var e = new[] { 1, 2, 3 }.Select(x => (byte)x);
Console.WriteLine(e.GetType().Name);