kCura.Utility.NullableTypesHelper
Provides methods for converting nullable types.
public NullableTypesHelper()
Converts a null value to dbNull if necessary. Does nothing otherwise.
Transforms the provided nullable, if it does not have a value, to DBNull.Value.
Transforms the provided string, if it is Nothing, to DBNull.Value.
Casts the provided object to Nullable(of T).
Verifies the provided item is not null. If it is, returns Value.
Casts the provided object, if it is not Value, to Nullable(of T).
Casts the provided object, if it is not Value, to T.
Casts the provided object, if it is not Value, to a guid string.
Casts the provided object, if it is not Nothing or Value, to Nullable(of T).
Casts the provided object, if it is not Value or Nothing, to a string.
Casts the provided object, if it is not Value, to a string.
Casts the provided nullable date to a string.
Casts the provided nullable decimal to a string.
Casts the provided nullable decimal to a string, utilizing the provided format string.
Casts the provided nullable integer to a string, utilizing the provided format string.
Casts the provided nullable boolean to a string, utilizing the provided format string.
Casts the provided string to String.Empty if it is null.
Casts the provided string to a nullable boolean.
Casts the provided string to a nullable date, utilizing the provided format string.
Casts the provided string to a nullable decimal, utilizing the provided format type.
public static decimal? ToNullableDecimalUsingCurrentCulture(string convertMe, NumberStyles type = 367)
Casts the provided string to a nullable integer.
Casts the provided string to a nullable long.
If id is 0 or negative, returns null. Otherwise return the value of id.
Gets the string representation of the provided string.