[Serializable] |
Many objects or properties throughout the System.CodeDom namespace use this type of object to store data types. A CodeTypeReference can be initialized with a System.Type object or a string. It is generally recommeneded to use a System.Type to do this although it may not always be possible. If initializing an instance of this object with a string, it is strongly recommended to always use fully qualified types, such as "System.Console" instead of just "Console", as not all languages support importing namespaces.
Array types can be specified by either passing in an array of System.Type or using one of the constructors that accept rank as a parameter.
ctor #1 | Overloaded:.ctor(string typeName) Initializes a new instance of the CodeTypeReference class using the specified data type name. |
ctor #2 | Overloaded:.ctor(Type type) Initializes a new instance of the CodeTypeReference class using the specified data type. |
ctor #3 | Overloaded:.ctor(CodeTypeReference arrayType, int rank) Initializes a new instance of the CodeTypeReference class using the specified array data type and array rank. |
ctor #4 | Overloaded:.ctor(string baseType, int rank) Initializes a new instance of the CodeTypeReference class using the specified array data type and array rank. |
ArrayElementType | Read-write Gets or sets the data type of the elements in the array. |
ArrayRank | Read-write Gets or sets the array rank of the array. |
BaseType | Read-write Gets or sets the name of the data type being referenced. |
UserData (inherited from System.CodeDom.CodeObject) |
Read-only See base class member description: System.CodeDom.CodeObject.UserData Gets or sets the user-definable data for the current object. |
Equals (inherited from System.Object) |
See base class member description: System.Object.Equals Derived from System.Object, the primary base class for all objects. |
GetHashCode (inherited from System.Object) |
See base class member description: System.Object.GetHashCode Derived from System.Object, the primary base class for all objects. |
GetType (inherited from System.Object) |
See base class member description: System.Object.GetType Derived from System.Object, the primary base class for all objects. |
ToString (inherited from System.Object) |
See base class member description: System.Object.ToString Derived from System.Object, the primary base class for all objects. |
Finalize (inherited from System.Object) |
See base class member description: System.Object.Finalize Derived from System.Object, the primary base class for all objects. |
MemberwiseClone (inherited from System.Object) |
See base class member description: System.Object.MemberwiseClone Derived from System.Object, the primary base class for all objects. |
Hierarchy:
public CodeTypeReference( |
typeName
public CodeTypeReference( |
type
public CodeTypeReference(CodeTypeReference( |
arrayType
rank
baseType
rank
public CodeTypeReference ArrayElementType {get; set;}
|
public int ArrayRank {get; set;}
|
public string BaseType {get; set;}
|
public IDictionary UserData {get;}
|
~CodeTypeReference(); |
public virtual int GetHashCode(); |
public Type GetType(); |
protected object MemberwiseClone(); |
public virtual string ToString(); |