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: 15.0.2.11458
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 element type.
Public propertyElementName
The name of the 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
Is an array type.
Public propertyIsDataArray
Public propertyIsDynamicStruct
The base element is a DataStruct.
Public propertyIsStruct
The base element has a dynamic data 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 methodCreateArray
Create an instance of an array data type.
Public methodCreateArray(IList, IDataContextProvider, ConversionDelegate)
Create an instance of an array data type.
Public methodCreateInstance
Create an instance of this data type.
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(Int32)
Makes a (single dimension) array type with the specified length.
Public methodMakeArray(IReadOnlyListInt32)
Makes a multi-dimensional array type with the specified dimensions.
Public methodSetDimensions(Int32)
Sets the dimensions of a (single dimension) array type with the specified length.
Public methodSetDimensions(IReadOnlyListInt32)
Sets the dimensions using the specified dimensions.
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 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