StringExtensions Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Provides utility methods for converting string values to other data types.
public static class StringExtensions
type StringExtensions = class
Public Module StringExtensions
- Inheritance
-
StringExtensions
Methods
As<TValue>(String, TValue) |
Converts a string to the specified data type and specifies a default value. |
As<TValue>(String) |
Converts a string to a strongly typed value of the specified data type. |
AsBool(String, Boolean) |
Converts a string to a Boolean (true/false) value and specifies a default value. |
AsBool(String) |
Converts a string to a Boolean (true/false) value. |
AsDateTime(String, DateTime) |
Converts a string to a DateTime value and specifies a default value. |
AsDateTime(String) |
Converts a string to a DateTime value. |
AsDecimal(String, Decimal) |
Converts a string to a Decimal number and specifies a default value. |
AsDecimal(String) |
Converts a string to a Decimal number. |
AsFloat(String, Single) |
Converts a string to a Single number and specifies a default value. |
AsFloat(String) |
Converts a string to a Single number. |
AsInt(String, Int32) |
Converts a string to an integer and specifies a default value. |
AsInt(String) |
Converts a string to an integer. |
Is<TValue>(String) |
Checks whether a string can be converted to the specified data type. |
IsBool(String) |
Checks whether a string can be converted to the Boolean (true/false) type. |
IsDateTime(String) |
Checks whether a string can be converted to the DateTime type. |
IsDecimal(String) |
Checks whether a string can be converted to the Decimal type. |
IsEmpty(String) |
Checks whether a string value is null or empty. |
IsFloat(String) |
Checks whether a string can be converted to the Single type. |
IsInt(String) |
Checks whether a string can be converted to an integer. |