Click or drag to resize

DataType Class

Describes a data type, either a .Net System.Type or dynamic type that may have no .Net Type equivalent.
Inheritance Hierarchy
SystemObject
  Demo3D.PLC.CommsDataType

Namespace: Demo3D.PLC.Comms
Assembly: PLC (in PLC.dll) Version: 19.01.00
Syntax
C#
public sealed class DataType

The DataType type exposes the following members.

Properties
 NameDescription
Public propertyDimensions For an array, returns the dimensions of the array.
Public propertyElementFullName The full name of the base element type.
Public propertyElementIsDynamicStruct The base element is a DataStruct.
Public propertyElementIsStruct The base element has a structure definition.
Public propertyElementName The name of the base element type.
Public propertyElementSizeBits The size of the type (in bits, or -1 for variable sized types). If the type is an array, returns the size of the base element of the array.
Public propertyElementType The .Net System.Type. If the type is an array, this is the System.Type of the base element of the array.
Public propertyFullName Printable string describing the type.
Public propertyIsArray The type is an array type.
Public propertyIsDataArray The type is a DataArrayT.
Public propertyIsDynamicStruct The type is a DataStruct.
Public propertyIsStruct The type is a structure with a structure definition.
Public propertyName Printable string describing the type.
Public propertySizeBits The total size (in bits, or -1).
Public propertySystemType The system type.
Top
Methods
 NameDescription
Public methodAsDynamicStruct Returns a dynamic DataStruct for a struct type.
Public methodStatic memberCreateAndPopulateArray Convert and populate array.
Public methodCreateArray Create an instance of an array data type.
Public methodCreateArray(IList, DataType) Create an instance of an array data type.
Public methodCreateInstance Create an instance of this data type.
Public methodStatic memberDeSerialize Deserialize xml representation of the data type.
Public methodFindByPosition Find field by position.
Public methodFindFieldByName Find field by name.
Public methodFindFieldByOffset Find structure field by offset (bits);
Public methodStatic memberFindSystemType Parse .Net data type.
Public methodStatic memberFindType Parse data type.
Public methodGetBaseElementType Gets the base element type of an array.
Public methodGetElementType Returns the type of the array.
Public methodGetFields The fields of the structure (ordered, or null). Fields are ordered on FieldOffsetBits first and then on Position.
Public methodGetMemoryLayout Returns the memory layout of the fields in a structure.
Public methodStatic memberGetSystemType Parse .Net data type.
Public methodStatic memberGetType Parse data type.
Public methodIsAssignableFrom(DataType) Determines whether an instance of a specified type can be assigned to an instance of the current type.
Public methodIsAssignableFrom(Object) Determines whether a specified value can be assigned to an instance of the current type.
Public methodIsAssignableFrom(Type) Determines whether an instance of a specified type can be assigned to an instance of the current type.
Public methodStatic memberIsConvertible Determines whether an instance of a specified type (the source) can be converted to an instance of a different type (the destination).
Public methodIsConvertibleFrom Determines whether an instance of a specified type can be converted to an instance of the current type.
Public methodIsEquivalent Determines whether an instance of a specified type is equivalent to an instance of the current type.
Public methodStatic memberIsNullOrObject Returns true if the dataType is null or the Object type.
Public methodMakeArray(Int64, Boolean) Makes a (single dimensional) array type with the specified length.
Public methodMakeArray(IReadOnlyListDataArrayBounds, Boolean) Makes an array type with the specified dimensions.
Public methodMakeArray(IReadOnlyListDataArrayBounds, Boolean) Makes an array of arrays (jagged) type with the specified dimensions.
Public methodMakeArray(IReadOnlyListInt32, Boolean) Makes an array of arrays (jagged) type with the specified dimensions.
Public methodMakeArray(IReadOnlyListInt64, Boolean) Makes an array type with the specified dimensions.
Public methodMakeArray(IReadOnlyListInt64, Boolean) Makes an array of arrays (jagged) type with the specified dimensions.
Public methodSerialize Serialize data type to xml.
Public methodSetDimensions(Int32) Sets the dimensions of a (single dimensional) array type with the specified length.
Public methodSetDimensions(IReadOnlyListDataArrayBounds) Sets the dimensions using the specified dimensions.
Public methodTryCreateArray Create an instance of an array data type.
Public methodTryCreateInstance Create an instance of this data type.
Public methodStatic memberTryTypeof Returns the DataType for a .Net System.Type.
Public methodStatic memberTypeFromSize Returns a best guess DataType given a buffer of a given size.
Top
Fields
 NameDescription
Public fieldStatic memberBinaryString Demo3D.IO.BinaryString.
Public fieldStatic memberBit One bit.
Public fieldStatic memberBoolean One bit.
Public fieldStatic memberBuffer Demo3D.IO.Buffer.
Public fieldStatic memberBufferSegment Demo3D.IO.BufferSegment.
Public fieldStatic memberByte System.Byte.
Public fieldStatic memberChar System.Char.
Public fieldStatic memberDataStruct Demo3D.PLC.Comms.DataStruct.
Public fieldStatic memberDateTime System.DateTime.
Public fieldStatic memberDouble System.Double.
Public fieldStatic memberInt16 System.Int16.
Public fieldStatic memberInt32 System.Int32.
Public fieldStatic memberInt64 System.Int64.
Public fieldStatic memberObject System.Object.
Public fieldStatic memberSByte System.SByte.
Public fieldStatic memberSingle System.Single.
Public fieldStatic memberString System.String.
Public fieldStatic memberUInt16 System.UInt16.
Public fieldStatic memberUInt32 System.UInt32.
Public fieldStatic memberUInt64 System.UInt64.
Top
See Also