Name

FormatterServices

Synopsis

The methods of this noninheritable class provide some background functionality to a formatter when serializing and deserializing objects. For example, GetObjectData() creates an array of System.Reflection.MemberInfo object data. GetSerializableMembers() retrieves all the serializable members of a given class. PopulateObjectMembers() is the basic deserialization method, using a MemberInfo array of member names and an array of corresponding data values to repopulate a specified object.

Public NotInheritable Class FormatterServices
                  ' Public Shared Methods
   Public Shared Function GetObjectData(ByVal obj As Object, 
        ByVal members As System.Reflection.MemberInfo()) As Object()  
   Public Shared Function GetSerializableMembers(
        ByVal type As Type) As MemberInfo()  
   Public Shared Function GetSerializableMembers(
        ByVal type As Type, 
        ByVal context As StreamingContext) As MemberInfo()  
   Public Shared Function GetTypeFromAssembly(
        ByVal assem As System.Reflection.Assembly, 
        ByVal name As String) As Type  
   Public Shared Function GetUninitializedObject(
        ByVal type As Type) As Object  
   Public Shared Function PopulateObjectMembers(
        ByVal obj As Object, 
        ByVal members As System.Reflection.MemberInfo(), 
        ByVal data As Object()) As Object  
End Class

Get VB.NET Core Classes in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.