Convert Class

Class for conversion methods.

Definition

Namespace: Aliquo.Core
Assembly: Aliquo.Core (in Aliquo.Core.dll) Version: 5.0.9179.22651
C#
public class Convert
Inheritance
Object    Convert

Constructors

ConvertInitializes a new instance of the Convert class

Methods

CheckThrowHandledException Check if HandledException is thrown.
ColorFromHex Converts a hexadecimal string to a color.
ContainsReferenceInEnumT(Object) Indicates whether the enumeration contains the reference attribute ReferenceValueAttribute.
ContainsReferenceInEnumT(String) Indicates whether the enumeration contains the reference attribute ReferenceValueAttribute
ContainsReferenceNameInEnumT(Object) Indicates whether the enumeration contains the reference attribute ReferenceNameAttribute.
ContainsReferenceNameInEnumT(String) Get whether the enumeration contains the reference attribute ReferenceNameAttribute.
ContainsValueInEnumT(Int32) Indicates whether the enumeration contains the value.
ContainsValueInEnumT(Object) Indicates whether the enumeration contains the value.
ContainsValueInEnumObject Indicates whether the enumeration contains the value.
DateTimeIsEmpty Indicates if the date and time are empty.
DecimalPlacesNumber(Decimal, Int32) Get the number of decimal places of a value.
DecimalPlacesNumber(Object, Int32) Get the number of decimal places of a value.
DrawingColorFromHex Convert a hexadecimal string to a color.
DrawingColorFromHSB(Single, Single, Single) Converts hue, saturation and brightness values to a color.
DrawingColorFromHSB(Int32, Single, Single, Single) Converts transparency, hue, saturation and brightness values to a color.
DrawingColorSetAlpha Get a color by changing the transparency value.
DrawingColorSetBrightness Get a color by changing the brightness value.
DrawingColorToHex Convert a color to a hexadecimal string.
EmptyToDBNull Converts to DBNull when the indicated value is empty.
ExpressionCompute Calculate an expression.
HandledExceptionToHandledFault Converts a HandledException to a HandledFault.
HandledFaultToHandledException Converts a HandledFault to a HandledException.
IsHandledException Indicates whether the exception is HandledException.
IsHandledFault Indicates whether the exception is HandledFault.
LanguageToCultureInfo Convert a language code to a culture.
NothingToDBNull Converts to DBNull when the indicated value is .
ParseEnumT Convert string to corresponding Enum.
PropertyValueFromEnumValueTypeAttribute Converts a value of the type indicated in the attribute EnumValueTypeAttribute to the property enumeration.
PropertyValueToEnumValueTypeAttribute Converts the value of the property enumeration to the value type indicated in the EnumValueTypeAttribute attribute.
PropertyValueWithDataTypeAttribute Converts the value of the property using the DataTypeAttribute attribute.
ReferenceNameToEnumT(Object) Get the value of the enumeration given its reference ReferenceNameAttribute
ReferenceNameToEnumT(String) Get the value of the enumeration given its reference ReferenceNameAttribute.
ReferenceNameToEnumObject Get the value of the enumeration given its reference ReferenceNameAttribute
ReferenceToEnumT(Object) Get the value of the enum given its reference ReferenceValueAttribute.
ReferenceToEnumT(String) Get the value of the enum given its reference ReferenceValueAttribute.
ReferenceToEnumObject Get the value of the enum given its reference ReferenceValueAttribute.
StringIsDigitsOnly Indicates if the string is made up only of digits 0 to 9.
StringIsEmpty Indicates if the string value is empty.
ToAscII(Char) Convert a character to AscII code.
ToAscII(String) Convert a character to AscII code.
ToCategoryData(String) Get the category of the data type.
ToCategoryData(Type) Get the category of the data type.
ToType Gets the data type.
ToUTF8 Convert a string to UTF8 string
TypeIsNullable Indicates if the data type is nullable.
TypeToString(String) Gets the data type as text.
TypeToString(Type) Gets the data type as text.
ValueIsDateTime Indicates if a value is DateTime type.
ValueIsDBNull Indicates if a value is DBNull.
ValueIsInteger Indicates whether a value is Int32 type.
ValueIsNumeric Indicates if a value is numeric.
ValueToBoolean(Object) Convert a value to a Boolean.
ValueToBoolean(Object, Boolean) Convert a value to a boolean.
ValueToBooleanNullable Converts a value to a boolean or null.
ValueToByte(Object) Converts a value to a Byte.
ValueToByte(Object, Byte) Converts a value to a Byte.
ValueToByteNullable Converts a value to a type Byte or null
ValueToDataRow Converts a value to DataRow.
ValueToDate Converts a value to a date without time of type DateTime.
ValueToDateNullable Converts a value to a date without time of type DateTime or null.
ValueToDateTime(Object) Converts a value to a date with time of type DateTime.
ValueToDateTime(Object, Object) Converts a date value and a hours value to a date with hours of type DateTime.
ValueToDateTime(Object, TimeSpan) Convert a value to a date and time with the indicated time offset.
ValueToDateTimeNullable(Object) Converts a value to a date with times of type DateTime.
ValueToDateTimeNullable(Object, Boolean) Converts a value to a date with time of type DateTime.
ValueToDateTimeNullable(Object, Object) Converts a date value and a hours value to a date with hours of type DateTime.
ValueToDateTimeOffset(Object) Convert a value to the date, time, and time offset, with respect to the current time zone.
ValueToDateTimeOffset(Object, TimeSpan) Convert a value to the date, time, and time offset, with respect to the current time zone.
ValueToDateTimeOffsetNullable Converts a value to a date with time of type DateTime.
ValueToDecimal(Object) Converts a value into a Decimal type number.
ValueToDecimal(Object, Decimal) Converts a value into a Decimal type number.
ValueToDecimalNullable Converts a value into a Decimal type number or null.
ValueToEnumT(Int32) Converts an int to the corresponding Enum (based on the value in the Enum).
ValueToEnumT(Object) Converts an object to the corresponding Enum (based on the value in the Enum).
ValueToEnumObject(Type, Int32) Converts an object to the corresponding Enum (based on the value in the Enum).
ValueToEnumObject(Type, Object) Converts an object to the corresponding Enum (based on the value in the Enum).
ValueToInt16(Object) Converts a value to a number of type Int16.
ValueToInt16(Object, Int16) Converts a value to a number of type Int16.
ValueToInt16Nullable Converts a value to a number of type Int16 or null.
ValueToInt32(Object) Converts a value to a number of type Int32.
ValueToInt32(Object, Int32) Converts a value to a number of type Int32.
ValueToInt32Nullable Converts a value to a number of type Int32 or null.
ValueToInt64(Object) Converts a value to a number of type Int64.
ValueToInt64(Object, Int64) Converts a value to a number of type Int64.
ValueToInt64Nullable Converts a value to a number of type Int64 or null.
ValueToRoundDecimal Round the decimals of a number.
ValueToString(Object) Convert a value to a String.
ValueToString(Object, String) Convert a value to a String.
ValueToStringNullable Convert a value to a String.
ValueToTime Converts a value to hours without dates using a DateTime type.
ValueToTimeSpan Converts a value to a time interval.
ValueToType(Object, String, Boolean) Converts a value to a data type.
ValueToType(Object, Type, Boolean) Converts a value to a data type.
ValueToTypeNullable Converts a value to a data type.
ZeroToDBNull Converts to DBNull when the indicated value is 0.
ZeroToNullable(Decimal) Converts to null when the indicated value is 0.
ZeroToNullable(Int16) Converts to when the indicated value is 0.
ZeroToNullable(Int32) Converts to when the indicated value is 0.
ZeroToNullable(Int64) Converts to when the indicated value is 0.

Extension Methods

GetAttributeFromT Get attribute from a class.
(Defined by ObjectExtensions)
ValidateDataAnnotations Validate class with validator of DataAnnotations.
(Defined by ObjectExtensions)

See Also