Show / Hide Table of Contents

Class ValueTypeExtensions

Value type extension methods

Inheritance
object
ValueTypeExtensions
Inherited Members
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: PayrollEngine.Client.Scripting
Assembly: PayrollEngine.Client.Scripting.dll
Syntax
public static class ValueTypeExtensions

Methods

GetDataType(ValueType)

Get the data type

Declaration
public static Type GetDataType(this ValueType valueType)
Parameters
Type Name Description
ValueType valueType
Returns
Type Description
Type

The data type

GetValueType(object)

Get the value type

Declaration
public static ValueType GetValueType(this object value)
Parameters
Type Name Description
object value

The value

Returns
Type Description
ValueType

The value type

IsBoolean(ValueType)

Test if value type is a bool

Declaration
public static bool IsBoolean(this ValueType valueType)
Parameters
Type Name Description
ValueType valueType
Returns
Type Description
bool

True for boolean value types

IsDateTime(ValueType)

Test if value type is a date time

Declaration
public static bool IsDateTime(this ValueType valueType)
Parameters
Type Name Description
ValueType valueType
Returns
Type Description
bool

True for date time value types

IsDecimal(ValueType)

Test if value type is a decimal number

Declaration
public static bool IsDecimal(this ValueType valueType)
Parameters
Type Name Description
ValueType valueType
Returns
Type Description
bool

True for decimal number value types

IsInteger(ValueType)

Test if value type is an integer

Declaration
public static bool IsInteger(this ValueType valueType)
Parameters
Type Name Description
ValueType valueType
Returns
Type Description
bool

True for integer value types

IsNumber(ValueType)

Test if value type is a number

Declaration
public static bool IsNumber(this ValueType valueType)
Parameters
Type Name Description
ValueType valueType
Returns
Type Description
bool

True for number value types

IsString(ValueType)

Test if value type is a string

Declaration
public static bool IsString(this ValueType valueType)
Parameters
Type Name Description
ValueType valueType
Returns
Type Description
bool

True for string value types

JsonToValue(ValueType, string)

Convert json by value type

Declaration
public static object JsonToValue(this ValueType valueType, string json)
Parameters
Type Name Description
ValueType valueType

The value type

string json

The json to convert

Returns
Type Description
object

Object value

☀
☾
Back to top Generated by DocFX