title: How to pass a generic type not having a Interface to a Of T function
body: <p>I have a following code which works fine</p>
  
  <pre><code>MsgBox(AddSomething(Of String)("Hello", "World"))
  
  Public Function AddSomething(Of T)(ByVal FirstValue As T, ByVal SecondValue As T) As String
      Return FirstValue.ToString + SecondValue.ToString
  End Function
  </code></pre>
  
  <p>Now we are redesigning the application to work with parameters of different types which will be provided through XML</p>
  
  <pre><code>  &lt;SomeValues&gt;
      &lt;Add Param1="Somedata" Param2="SomeData" MyType="String"/&gt;
      &lt;Add Param1="Somedata" Param2="SomeData" MyType="MyBusinessObject"/&gt;
    &lt;/SomeValues&gt;
  </code></pre>
  
  <p>If I try to provide the following it gives error as Of accepts only type</p>
  
  <pre><code>    ''''Get DetailsFromXml --- MyType,Param1,Param2
      MsgBox(AddSomething(Of Type.GetType(MyType))(Param1,Param2))
  </code></pre>
  
  <p>How to solve this issue.</p>
  
  <p><strong>Edit</strong></p>
  
  <p>The above example is given to make the question simple. Actual issue is as follows 
  I am using SCSF of P&amp;P. 
  Following is per view code which has to be written for each view</p>
  
  <pre><code>Private Sub tsStudentTableMenuClick()
      Dim _StudentTableListView As StudentListView
      _StudentTableListView = ShowViewInWorkspace(Of StudentListView)("StudentTable List", WorkspaceNames.RightWorkspace)
      _StudentTableListView.Show()
  End Sub
  </code></pre>
  
  <p>Now I want to show the views dynamically.</p>
  
  <pre><code> Public Sub ShowModalView(ByVal ViewName As String)
          Dim _MasterListView As &gt;&gt;&gt;EmployeeListView&lt;&lt;&lt;&lt;
          _MasterListView = ShowViewInWorkspace(Of &gt;&gt;&gt;EmployeeListView&lt;&lt;&lt;)("Employee List", WorkspaceNames.RightWorkspace)
          _MasterListView.Show()
      End Sub
  </code></pre>
  
  <p>So the part shown using the arrows above has to be somehow dynamically provided.</p>