ProtocolJsonSerializer.ToObject<T>(Object, Func<T>) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Convert an object to the desired type using serialization and deserialization.
public static T ToObject<T>(object value, Func<T> defaultFactory = default);
static member ToObject : obj * Func<'T> -> 'T
Public Function ToObject(Of T) (value As Object, Optional defaultFactory As Func(Of T) = Nothing) As T
Type Parameters
- T
The type of object to convert to.
Parameters
- value
- Object
The object to be converted to desired type: string, MemoryStream, object
- defaultFactory
- Func<T>
Returns
The converted object.