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