W
wisaunders
I have several different classes that contain the same four
properties. I tell my application property of which class to call in
the configuration file.
Here are the values from my config file
<class>AAAA</class>
<property>1111</property>
This is how I current have it working.
Dim sql As String = ""
Select Case classVariable
Case "AAAA"
Dim extract As New AAAA
Select Case propertyVariable
Case "1111"
sql = extract.1111
Case "2222"
sql = extract.2222
Case "3333"
sql = extract.3333
Case "4444"
sql = extract.4444
Case Else
'quit function
End Select
Case "BBBB"
Dim extract As New BBBB
Select Case propertyVariable
Case "1111"
sql = extract.1111
Case "2222"
sql = extract.2222
Case "3333"
sql = extract.3333
Case "4444"
sql = extract.4444
Case Else
'quit function
End Select
Case "CCCC"
Dim extract As New CCCC
Select Case propertyVariable
Case "1111"
sql = extract.1111
Case "2222"
sql = extract.2222
Case "3333"
sql = extract.3333
Case "4444"
sql = extract.4444
Case Else
'quit function
End Select
End Select
Is there a was to call these classes and properties dynamically with
variable from my config file.
Something that looks like this? I don't want to have to add another
case and select case for every new class.
Dim extract as new [classVariable]
Sql = extract.[propertyVariable]
Thanks in advance,
Will
properties. I tell my application property of which class to call in
the configuration file.
Here are the values from my config file
<class>AAAA</class>
<property>1111</property>
This is how I current have it working.
Dim sql As String = ""
Select Case classVariable
Case "AAAA"
Dim extract As New AAAA
Select Case propertyVariable
Case "1111"
sql = extract.1111
Case "2222"
sql = extract.2222
Case "3333"
sql = extract.3333
Case "4444"
sql = extract.4444
Case Else
'quit function
End Select
Case "BBBB"
Dim extract As New BBBB
Select Case propertyVariable
Case "1111"
sql = extract.1111
Case "2222"
sql = extract.2222
Case "3333"
sql = extract.3333
Case "4444"
sql = extract.4444
Case Else
'quit function
End Select
Case "CCCC"
Dim extract As New CCCC
Select Case propertyVariable
Case "1111"
sql = extract.1111
Case "2222"
sql = extract.2222
Case "3333"
sql = extract.3333
Case "4444"
sql = extract.4444
Case Else
'quit function
End Select
End Select
Is there a was to call these classes and properties dynamically with
variable from my config file.
Something that looks like this? I don't want to have to add another
case and select case for every new class.
Dim extract as new [classVariable]
Sql = extract.[propertyVariable]
Thanks in advance,
Will