SystemExt/Maybe{T}.cs
/// <summary>
/// Converts a <see cref="Nullable{T2}"/> value to an <see cref="Maybe{T}"/>.
/// </summary>
/// <typeparam name="T2">
/// The type which is being wrapped by the <see cref="Nullable{T2}"/>.
/// </typeparam>
/// <param name="value">
/// A nullable value to convert to an <see cref="Maybe{T}"/>.
/// </param>
/// <returns>
/// A new <see cref="Maybe{T}"/> which wraps the value in <paramref name="value"/>.
/// </returns>
Converts a  value to an .
Converts a value to an .
public static Maybe<T2> FromNullable<T2>(T2? value)
            where T2 : struct
        {
            return value.HasValue ? new Maybe<T2>(value.Value) : Maybe<T2>.None;
        }
public static Maybe < T2 > FromNullable < T2 > ( T2 ? value ) where T2 : struct { return value . HasValue ? new Maybe < T2 > ( value . Value ) : Maybe < T2 > . None ; }
Converts a  value to an .
Converts a value to an .
A new  which wraps the value in .
A new which wraps the value in .
value
T2?
A nullable value to convert to an .
A nullable value to convert to an .
typeparam
The type which is being wrapped by the .
The type which is being wrapped by the .