Retrieves a type definition given a type name.
Namespace: Microsoft.VisualStudio.Data
Assembly: Microsoft.VisualStudio.Data (in Microsoft.VisualStudio.Data.dll)
Syntax
'宣言
Public Overridable Function GetType ( _
typeName As String _
) As Type
'使用
Dim instance As DataProviderObjectFactory
Dim typeName As String
Dim returnValue As Type
returnValue = instance.GetType(typeName)
public virtual Type GetType(
string typeName
)
public:
virtual Type^ GetType(
String^ typeName
)
public function GetType(
typeName : String
) : Type
Parameters
typeName
Type: System.StringName of the type to return.
Return Value
Type: System.Type
Returns a type object instance.
Remarks
This method allows DDEX providers to customize resolution of types referenced from dynamic locations such as XML files. The base class implementation tries to locate a comma separating the type name from its qualifying assembly, and if found, calls the GetAssembly method with the assembly qualifier and, if found, tries to retrieve the type from this assembly. Otherwise it calls GetAssembly with an empty string and, if found, tries to get the type from this assembly. Finally if the type is still not found, it calls the standard GetType method and returns the result of this call.
Permissions
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.
See Also
Reference
DataProviderObjectFactory Class