Create Object from String
From Logic Wiki
Revision as of 11:46, 14 August 2014 by Macrop (Talk) (Macrop moved page VB.NET Create Object from String to Create Object from String without leaving a redirect)
Dynamically Create Object From String
Public Function DynamicallyLoadedObject(ByVal objectName As String, Optional ByVal args() As Object = Nothing) As Object Dim returnObj As Object = Nothing Dim type As Type = Assembly.GetExecutingAssembly().GetType(Application.ProductName & "." & objectName) If Not type Is Nothing Then returnObj = Activator.CreateInstance(type, args) End If Return returnObj End Function