Common.Extensions

  • System.StringExtension
    This class contents contain extensions for System.String and System.string types.
  1. int ParseInt(string)
    Parses string to System.int
    System.int of the string. returns 0 if string is null or not a number.
  2. Int32 ParseInt32(string)
    Parses string to System.Int32
    System.Int32 of the string. returns 0 if string is null or not a number.
  3. Int64 ParseInt64(string)
    Parses string to System.Int64
    System.Int64 of the string. returns 0 if string is null or not a number.
  4. short ParseShort(string)
    Parses string to System.short
    System.short of the string. returns 0 if string is null or not a number.
  5. long ParseLong(string)
    Parses string to System.long
    System.long of the string. returns 0 if string is null or not a number.
  6. double ParseDouble(string)
    Parses string to System.double
    System.double of the string. returns 0 if string is null or not a number.
  7. decimal ParseDecimal(string)
    Parses string to System.decimal
    System.decimal of the string. returns 0 if string is null or not a number.
  8. bool ParseBool(string)
    Value can be 1, 0, true or false as strings
  9. Boolean ParseBoolean(string)
    Value can be 1, 0, true or false as strings
  10. DateTime ParseDateTime(string)
    Parses string to System.DateTime
  11. string ToNullIfEmpty(string)
    Checks for String.Empty. If true than sets it to null.
  12. string ToEmptyIfNull(string)
    Checks for null. If true than sets it to String.Empty

Last edited Mar 19, 2013 at 1:03 PM by cschuchardt88, version 6

Comments

No comments yet.