ThisToThat/ThisToThat/ToSByteExtensions.cs
/// <summary>
/// Converts and returns this string's value as SByte.
/// The default value passed in is returned if the string does not successfully parse to SByte.
/// </summary>
/// <returns>This string converted to SByte, or the default value if conversion unsuccessful.</returns>
Converts and returns this string's value as SByte.
The default value passed in is returned if the string does not successfully parse to SByte.
Converts and returns this string ' s value as SByte . The default value passed in is returned if the string does not successfully parse to SByte .
public static SByte ToSByteOrDefault(this string strThisString, SByte sbyteDefault = default(SByte))
        {
            SByte sbyteReturn;
            return SByte.TryParse(strThisString, out sbyteReturn) ? sbyteReturn : sbyteDefault;
        }
public static SByte ToSByteOrDefault ( this string strThisString , SByte sbyteDefault = default ( SByte ) ) { SByte sbyteReturn ; return SByte . TryParse ( strThisString , out sbyteReturn ) ? sbyteReturn : sbyteDefault ; }
Converts and returns this string's value as SByte.
Converts and returns this string ' s value as SByte .
This string converted to SByte, or the default value if conversion unsuccessful.
This string converted to SByte or the default value if conversion unsuccessful .
string
this
sbyteDefault
SByte