Show / Hide Table of Contents

Class NullableExtensions

Type extension methods

Inheritance
object
NullableExtensions
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 NullableExtensions

Methods

View Source

Safe(bool?, bool)

Safe nullable boolean cast

Declaration
public static bool Safe(this bool? value, bool defaultValue = false)
Parameters
Type Name Description
bool? value
bool defaultValue
Returns
Type Description
bool
View Source

Safe(DateTime?, DateTime)

Safe nullable DateTime cast

Declaration
public static DateTime Safe(this DateTime? value, DateTime defaultValue = default)
Parameters
Type Name Description
DateTime? value
DateTime defaultValue
Returns
Type Description
DateTime
View Source

Safe(decimal?, decimal)

Safe nullable decimal cast

Declaration
public static decimal Safe(this decimal? value, decimal defaultValue = 0)
Parameters
Type Name Description
decimal? value
decimal defaultValue
Returns
Type Description
decimal
View Source

Safe(int?, int)

Safe nullable int cast

Declaration
public static int Safe(this int? value, int defaultValue = 0)
Parameters
Type Name Description
int? value
int defaultValue
Returns
Type Description
int
  • View Source
☀
☾
Back to top Generated by DocFX