Microsoft Silverlight will reach end of support after October 2021. Learn more.
Locates the specified type from this assembly and creates an instance of it using the system activator, using case-sensitive search.
Assembly: mscorlib (in mscorlib.dll)
'Declaration Public Function CreateInstance ( _ typeName As String _ ) As Object
public Object CreateInstance( string typeName )
An instance of Object representing the type, with culture, arguments, binder, and activation attributes set to nulla null reference (Nothing in Visual Basic), and BindingFlags set to Public or Instance, or nulla null reference (Nothing in Visual Basic) if typeName is not found.
typeName is an empty string ("") or a string beginning with a null character.
typeName is nulla null reference (Nothing in Visual Basic).
No matching constructor was found.
typeName requires a dependent assembly that could not be found.
typeName requires a dependent assembly that was found but could not be loaded.
typeName requires a dependent assembly, but the file is not a valid assembly.
typeName requires a dependent assembly which was compiled for a version of the runtime later than the currently loaded version.
The method is invoked late-bound through mechanisms such as Type.InvokeMember.
Supported in: 5, 4, 3
Silverlight for Windows Phone
Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0
Supported in: Xbox 360, Windows Phone OS 7.0
For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.