Click or drag to resize

ExtensionsIsNotNullT, TResult Method (T, FuncT, TResult)

Checks if the value is null. If not, it will invoke func

Namespace:  Cauldron
Assembly:  Cauldron (in Cauldron.dll) Version: 3.2.0.1 (3.2.0.1)
Syntax
C#
public static TResult IsNotNull<T, TResult>(
	this T value,
	Func<T, TResult> func
)
where T : class

Parameters

value
Type: T
The value to check
func
Type: SystemFuncT, TResult
The func to invoke if value is not null

Type Parameters

T
The type of the value
TResult
The return type

Return Value

Type: TResult
The result of value

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type . When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also