E
Etienne-Louis Nicolet
I have a generic class defined as follows:
Public Class SqlArgument(Of TDataType)
Private _values as List(Of TDataType)
Public Property Values() As List(Of TDataType)
Get
Return _values
End Get
Set(ByVal pValues As List(Of TDataType))
_values = pValues
End Set
Public Sub New()
Me.Values = New List(Of TDataType)
End Sub
....
End Class
Given the DataType property of a (strongly typed) DataTable I'd like to
create a new instance of SqlArgument with the data type of the appropriate
table column. I thought about something like
Sub TestArgument(pColumn as System.Data.DataColumn)
...
Dim s As new SqlArgument(Of pColumn.DataType)
...
End Sub
but obviously this does not work. Can anybody give me a hint on how to do
this?
Many thanks for your suggestions,
Etienne
Public Class SqlArgument(Of TDataType)
Private _values as List(Of TDataType)
Public Property Values() As List(Of TDataType)
Get
Return _values
End Get
Set(ByVal pValues As List(Of TDataType))
_values = pValues
End Set
Public Sub New()
Me.Values = New List(Of TDataType)
End Sub
....
End Class
Given the DataType property of a (strongly typed) DataTable I'd like to
create a new instance of SqlArgument with the data type of the appropriate
table column. I thought about something like
Sub TestArgument(pColumn as System.Data.DataColumn)
...
Dim s As new SqlArgument(Of pColumn.DataType)
...
End Sub
but obviously this does not work. Can anybody give me a hint on how to do
this?
Many thanks for your suggestions,
Etienne