System.Data 2.0.0.0 System.Enum

Used by and to indicate the serialization format of a user-defined type (UDT) or aggregate.

Used by and to indicate the serialization format of a user-defined type (UDT) or aggregate.

- Field
  Microsoft.SqlServer.Server.Format

  The requirements for this format are:

  The StructLayout.LayoutKindSequential attribute must be applied to the aggregate or UDT if it is defined in a class and not a structure. This controls the physical layout of the data fields, and is used to force the members to be laid out sequentially in the order they appear. SQL Server uses this attribute to determine the field order for UDTs with multiple fields.

  The type must contain at least one member (serialized values cannot be zero bytes in size).

  All the fields of the aggregate must be blittable, that is, they must have a common representation in both managed and unmanaged memory and not require special handling by the interop marshaler.

  All the fields of the UDT should be of one of the following types that can be serialized: bool, byte,sbyte,short,ushort, int, uint, long, ulong, float, double, , , , , , , , , or other value types defined by the user that contain fields of one of these types.

  The aggregate must not specify a value for MaxByteSize.

  The aggregate must not have any [NonSerialized] fields.

  Fields must not be marked as an explicit layout ().

  The Native serialization format uses a very simple algorithm that enables SQL Server to store an efficient representation of the UDT on disk. Types marked for Native serialization can only have value types (structs in Microsoft Visual C# and structures in Microsoft Visual Basic .NET) as members. Members of reference types (such as classes in Visual C# and Visual Basic), either user-defined or those existing in the framework (such as ), are not supported.

  2.0.0.0
- Field
  Microsoft.SqlServer.Server.Format

  The serialization format is unknown.

  2.0.0.0
- Field
  Microsoft.SqlServer.Server.Format

  The aggregate must specify a value for MaxByteSize.

  Specify the attribute property. The default value is false.

  If you omit any field in the or methods, the state of that field is not serialized.

  The UserDefined serialization format gives the developer full control over the binary format through the .Write and .Read methods.

  2.0.0.0