| ExtensionsWithTType, TNew Method |
Makes it possible to modify or to check an object using a delegate.
Namespace:
Cauldron
Assembly:
Cauldron (in Cauldron.dll) Version: 3.2.0.2
Syntax public static TNew With<TType, TNew>(
this TType target,
Func<TType, TNew> predicate
)
<ExtensionAttribute>
Public Shared Function With(Of TType, TNew) (
target As TType,
predicate As Func(Of TType, TNew)
) As TNew
public:
[ExtensionAttribute]
generic<typename TType, typename TNew>
static TNew With(
TType target,
Func<TType, TNew>^ predicate
)
Parameters
- target
- Type: TType
The instance of interest. - predicate
- Type: SystemFuncTType, TNew
The delegate that is used to modify or check the object.
Type Parameters
- TType
- The type of the instance.
- TNew
- The new type to return. Can be the same as TType.
Return Value
Type:
TNewAny return value from the
predicateUsage 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