2024-04-19 23:12:24 -05:00
|
|
|
|
# Deserialize<T>(Byte[]) Method
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Deserializes an object to a given *T* type.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## Definition
|
2024-04-21 03:30:36 -05:00
|
|
|
|
**Namespace:** <a href="N_CapyKit_Helpers.md">CapyKit.Helpers</a>
|
2024-09-04 19:31:43 -05:00
|
|
|
|
**Assembly:** CapyKit (in CapyKit.dll) Version: 1.0.2
|
2024-04-19 23:12:24 -05:00
|
|
|
|
|
|
|
|
|
**C#**
|
|
|
|
|
``` C#
|
|
|
|
|
public static T Deserialize<T>(
|
|
|
|
|
byte[] bytes
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
**F#**
|
|
|
|
|
``` F#
|
|
|
|
|
static member Deserialize :
|
|
|
|
|
bytes : byte[] -> 'T
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#### Parameters
|
|
|
|
|
<dl><dt> <a href="https://learn.microsoft.com/dotnet/api/system.byte" target="_blank" rel="noopener noreferrer">Byte</a>[]</dt><dd>The byte array representing a <em>T</em> object.</dd></dl>
|
|
|
|
|
|
|
|
|
|
#### Type Parameters
|
|
|
|
|
<dl><dt /><dd>Generic type parameter.</dd></dl>
|
|
|
|
|
|
|
|
|
|
#### Return Value
|
|
|
|
|
T
|
|
|
|
|
A *T* object.
|
|
|
|
|
|
|
|
|
|
## Exceptions
|
|
|
|
|
<table>
|
|
|
|
|
<tr>
|
|
|
|
|
<td><a href="https://learn.microsoft.com/dotnet/api/system.formatexception" target="_blank" rel="noopener noreferrer">FormatException</a></td>
|
|
|
|
|
<td>Thrown when the format of the byte array is incorrect.</td></tr>
|
|
|
|
|
</table>
|
|
|
|
|
|
|
|
|
|
## See Also
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#### Reference
|
2024-04-21 03:30:36 -05:00
|
|
|
|
<a href="T_CapyKit_Helpers_SerializationHelper.md">SerializationHelper Class</a>
|
|
|
|
|
<a href="Overload_CapyKit_Helpers_SerializationHelper_Deserialize.md">Deserialize Overload</a>
|
|
|
|
|
<a href="N_CapyKit_Helpers.md">CapyKit.Helpers Namespace</a>
|