Skip to content

Latest commit

 

History

History
47 lines (35 loc) · 5.85 KB

Assorted.Utils.Serialization.ConvertUtils.md

File metadata and controls

47 lines (35 loc) · 5.85 KB

ConvertUtils Class

Namespace: Assorted.Utils.Serialization
Assembly: Assorted.Utils (Assorted.Utils.dll) version 1.1.0.0
Inheritance: object ConvertUtils

Provides some helper methods for converting primitive values from their culture independent string representation.

Syntax

public static class ConvertUtils

Methods

Method Description
StrToBool(string) Converts the specified standard string representation of a logical value to its System.Boolean equivalent. The leading and trailing white spaces are ignored.
StrToDate(string) Converts the specified standard string representation of a date to its System.DateTime equivalent. The leading and trailing white spaces are ignored.
StrToDateTime(string) Converts the specified standard string representation of a date and time to its System.DateTime equivalent. The leading and trailing white spaces are ignored.
StrToDateTimeOffset(string) Converts the specified standard string representation of a date and/or time to its System.DateTimeOffset equivalent. The leading and trailing white spaces are ignored.
StrToDecimal(string) Converts the specified standard string representation of a real number to its System.Decimal equivalent. The leading and trailing white spaces are ignored.
StrToDouble(string) Converts the specified standard string representation of a real number to its System.Double equivalent. The leading and trailing white spaces are ignored.
StrToEnum<TEnum>(string) Converts the specified standard string representation of an enumerated constant to its System.Enum equivalent. The leading and trailing white spaces are ignored.
StrToInt16(string) Converts the specified standard string representation of an integer number to its System.Int16 equivalent. The leading and trailing white spaces are ignored.
StrToInt32(string) Converts the specified standard string representation of an integer number to its System.Int32 equivalent. The leading and trailing white spaces are ignored.
StrToInt64(string) Converts the specified standard string representation of an integer number to its System.Int64 equivalent. The leading and trailing white spaces are ignored.
StrToInt8(string) Converts the specified standard string representation of an integer number to its System.SByte equivalent. The leading and trailing white spaces are ignored.
StrToSingle(string) Converts the specified standard string representation of a real number to its System.Single equivalent. The leading and trailing white spaces are ignored.
StrToTime(string) Converts the specified standard string representation of a time to its System.DateTime equivalent. The leading and trailing white spaces are ignored.
StrToUInt16(string) Converts the specified standard string representation of an integer number to its System.UInt16 equivalent. The leading and trailing white spaces are ignored.
StrToUInt32(string) Converts the specified standard string representation of an integer number to its System.UInt32 equivalent. The leading and trailing white spaces are ignored.
StrToUInt64(string) Converts the specified standard string representation of an integer number to its System.UInt64 equivalent. The leading and trailing white spaces are ignored.
StrToUInt8(string) Converts the specified standard string representation of an integer number to its System.Byte equivalent. The leading and trailing white spaces are ignored.

Thread Safety

Any public static member of this type is thread-safe, but instance members are not guaranteed to be thread-safe.

See Also


This document is generated by DG.