Share via


StringExtensions Methods

Include Protected Members
Include Inherited Members

The StringExtensions type exposes the following members.

Methods

  Name Description
Public methodStatic member As<TValue>(String) Converts a string to a strongly typed value of the specified data type.
Public methodStatic member As<TValue>(String, TValue) Converts a string to the specified data type and specifies a default value.
Public methodStatic member AsBool(String) Converts a string to a Boolean (true/false) value.
Public methodStatic member AsBool(String, Boolean) Converts a string to a Boolean (true/false) value and specifies a default value.
Public methodStatic member AsDateTime(String) Converts a string to a DateTime value.
Public methodStatic member AsDateTime(String, DateTime) Converts a string to a DateTime value and specifies a default value.
Public methodStatic member AsDecimal(String) Converts a string to a Decimal number.
Public methodStatic member AsDecimal(String, Decimal) Converts a string to a Decimal number and specifies a default value.
Public methodStatic member AsFloat(String) Converts a string to a Single number.
Public methodStatic member AsFloat(String, Single) Converts a string to a Single number and specifies a default value.
Public methodStatic member AsInt(String) Converts a string to an integer.
Public methodStatic member AsInt(String, Int32) Converts a string to an integer and specifies a default value.
Public methodStatic member Is<TValue> Checks whether a string can be converted to the specified data type.
Public methodStatic member IsBool Checks whether a string can be converted to the Boolean (true/false) type.
Public methodStatic member IsDateTime Checks whether a string can be converted to the DateTime type.
Public methodStatic member IsDecimal Checks whether a string can be converted to the Decimal type.
Public methodStatic member IsEmpty Checks whether a string value is null reference (Nothing in Visual Basic) or empty.
Public methodStatic member IsFloat Checks whether a string can be converted to the Single type.
Public methodStatic member IsInt Checks whether a string can be converted to an integer.

Top

See Also

Reference

StringExtensions Class

System.Web.WebPages Namespace