76 lines
2.5 KiB
Markdown
76 lines
2.5 KiB
Markdown
# <a id="CapyKit_Extensions_ObjectExtensions"></a> Class ObjectExtensions
|
|
|
|
Namespace: [CapyKit.Extensions](CapyKit.Extensions.md)
|
|
Assembly: CapyKit.dll
|
|
|
|
An class containing extenstions that apply to any object type.
|
|
|
|
```csharp
|
|
public static class ObjectExtensions
|
|
```
|
|
|
|
#### Inheritance
|
|
|
|
[object](https://learn.microsoft.com/dotnet/api/system.object) ←
|
|
[ObjectExtensions](CapyKit.Extensions.ObjectExtensions.md)
|
|
|
|
#### Inherited Members
|
|
|
|
[object.Equals\(object?\)](https://learn.microsoft.com/dotnet/api/system.object.equals\#system\-object\-equals\(system\-object\)),
|
|
[object.Equals\(object?, object?\)](https://learn.microsoft.com/dotnet/api/system.object.equals\#system\-object\-equals\(system\-object\-system\-object\)),
|
|
[object.GetHashCode\(\)](https://learn.microsoft.com/dotnet/api/system.object.gethashcode),
|
|
[object.GetType\(\)](https://learn.microsoft.com/dotnet/api/system.object.gettype),
|
|
[object.MemberwiseClone\(\)](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone),
|
|
[object.ReferenceEquals\(object?, object?\)](https://learn.microsoft.com/dotnet/api/system.object.referenceequals),
|
|
[object.ToString\(\)](https://learn.microsoft.com/dotnet/api/system.object.tostring)
|
|
|
|
#### Extension Methods
|
|
|
|
[ObjectExtensions.UpdateProperties\(object, object\)](CapyKit.Extensions.ObjectExtensions.md\#CapyKit\_Extensions\_ObjectExtensions\_UpdateProperties\_System\_Object\_System\_Object\_)
|
|
|
|
## Methods
|
|
|
|
### <a id="CapyKit_Extensions_ObjectExtensions_UpdateProperties__1___0___0_"></a> UpdateProperties<T\>\(T, T\)
|
|
|
|
An object extension method that updates the properties of a given <code class="paramref">target</code>
|
|
object with the values from a given <code class="paramref">source</code> object.
|
|
|
|
```csharp
|
|
public static void UpdateProperties<T>(this T target, T source)
|
|
```
|
|
|
|
#### Parameters
|
|
|
|
`target` T
|
|
|
|
The target object to act on.
|
|
|
|
`source` T
|
|
|
|
Source for the new property values.
|
|
|
|
#### Type Parameters
|
|
|
|
`T`
|
|
|
|
Generic type parameter.
|
|
|
|
### <a id="CapyKit_Extensions_ObjectExtensions_UpdateProperties_System_Object_System_Object_"></a> UpdateProperties\(object, object\)
|
|
|
|
An object extension method that updates the properties of a given <code class="paramref">target</code>
|
|
object with the values from a given <code class="paramref">source</code> object.
|
|
|
|
```csharp
|
|
public static void UpdateProperties(this object target, object source)
|
|
```
|
|
|
|
#### Parameters
|
|
|
|
`target` [object](https://learn.microsoft.com/dotnet/api/system.object)
|
|
|
|
The target object to act on.
|
|
|
|
`source` [object](https://learn.microsoft.com/dotnet/api/system.object)
|
|
|
|
Source for the new property values.
|
|
|