E
Eric Sabine
I came across this line of code:
Dim arParms() As System.Data.SqlClient.SqlParameter = _
New System.Data.SqlClient.SqlParameter(3) {}
and am a bit confused because the New() method of the SqlParameter class
doesn't have a signature for only 1 input value. It has
New()
New(ByVal String, ByVal Object)
New(ByVal String, ByVal System.Data.SqlDbType)
New(ByVal String, ByVal System.Data.SqlDbType, ByVal Integer)
New(ByVal String, ByVal System.Data.SqlDbType, ByVal Integer, ByVal String)
But what follows the instantiation is to curly brackets, i.e., {}. So
logically if I comment out the 2 curly brackets at the end I get a syntax
error. Can someone explain to me what the "{}" does?
Thanks, Eric
Dim arParms() As System.Data.SqlClient.SqlParameter = _
New System.Data.SqlClient.SqlParameter(3) {}
and am a bit confused because the New() method of the SqlParameter class
doesn't have a signature for only 1 input value. It has
New()
New(ByVal String, ByVal Object)
New(ByVal String, ByVal System.Data.SqlDbType)
New(ByVal String, ByVal System.Data.SqlDbType, ByVal Integer)
New(ByVal String, ByVal System.Data.SqlDbType, ByVal Integer, ByVal String)
But what follows the instantiation is to curly brackets, i.e., {}. So
logically if I comment out the 2 curly brackets at the end I get a syntax
error. Can someone explain to me what the "{}" does?
Thanks, Eric