UtilSerializationSerializeT(T, SerializationFormat, Encoding) Method
Serializes the data of an Object to a String representation using the specified serialization format.
Namespace: DevCase.Core.DataProcessing.SerializationAssembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
Public Shared Function Serialize(Of T) (
obj As T,
format As SerializationFormat,
Optional enc As Encoding = Nothing
) As String
Dim obj As T
Dim format As SerializationFormat
Dim enc As Encoding
Dim returnValue As String
returnValue = UtilSerialization.Serialize(obj,
format, enc)
public:
generic<typename T>
static String^ Serialize(
T obj,
SerializationFormat format,
Encoding^ enc = nullptr
)
static member Serialize :
obj : 'T *
format : SerializationFormat *
?enc : Encoding
(* Defaults:
let _enc = defaultArg enc null
*)
-> string
No code example is currently available or this language may not be supported.
- obj T
-
The object to be serialized.
- format SerializationFormat
-
The serialization format.
- enc Encoding (Optional)
-
The Encoding to use for writing the.
- T
-
The type.
String
The resulting String representation of the serialized Object.
This is a code example for Binary serialization.
No code example is currently available or this language may not be supported.
Dim obj As String() = {"Hello World!"}
Dim result As String = Serialize(obj, SerializationFormat.Binary)
Console.WriteLine(result)
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.