ModelExtensionsMapPropertiesT Method |
Namespace:
Xcalibur.Extensions
Assembly:
Xcalibur.Extensions (in Xcalibur.Extensions.dll) Version: 1.0.4.0 (1.0.0.0)
Syntax public static void MapProperties<T>(
this T source,
T destination
)
where T : class
<ExtensionAttribute>
Public Shared Sub MapProperties(Of T As Class) (
source As T,
destination As T
)
public:
[ExtensionAttribute]
generic<typename T>
where T : ref class
static void MapProperties(
T source,
T destination
)
[<ExtensionAttribute>]
static member MapProperties :
source : 'T *
destination : 'T -> unit when 'T : not struct
Parameters
- source
- Type: T
The source. - destination
- Type: T
The destination.
Type Parameters
- T
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).
Exceptions Exception | Condition |
---|
Exception | Source and destination cannot be null and must be
of the same type! |
Examples 1SomeType myNewObject = new SomeType();
2
3
4myObject.MapProperties(myNewObject);
See Also