ThisToThat/ThisToThat/ToUInt16Extensions.cs
/// <summary>
/// Converts and returns this string's value as a nullable UInt16.
/// Null is returned if the value does not successfully parse to UInt16.
/// </summary>
/// <returns>This string's value converted to a nullable UInt16.</returns>
Converts and returns this string's value as a nullable UInt16.
Null is returned if the value does not successfully parse to UInt16.
Converts and returns this string ' s value as a nullable UInt16 . Null is returned if the value does not successfully parse to UInt16 .
public static UInt16? ToUInt16Nullable(this string strThisString)
        {
            UInt16 uint16Return;
            return UInt16.TryParse(strThisString, out uint16Return) ? uint16Return : (UInt16?)null;
        }
public static UInt16 ? ToUInt16Nullable ( this string strThisString ) { UInt16 uint16Return ; return UInt16 . TryParse ( strThisString , out uint16Return ) ? uint16Return : ( UInt16 ? ) null ; }
Converts and returns this string's value as a nullable UInt16.
Converts and returns this string ' s value as a nullable UInt16 .
This string's value converted to a nullable UInt16.
This string ' s value converted to a nullable UInt16 .
string
this