|
-
Dec 15th, 2007, 12:10 PM
#1
Thread Starter
Hyperactive Member
Passing a "new string"
Why would youe use "New String" to pass this paraemter?
VB Code:
ds.Load(dataReaderMaritalChoices,_
LoadOption.OverwriteChanges,_
New String() {"MaritalStatusChoices"})
Visual Studio .NET 2005/.NET Framework 2.0
-
Dec 15th, 2007, 01:17 PM
#2
Re: Passing a "new string"
I can't see a good reason to do that, where did you get it?
My usual boring signature: Nothing
 
-
Dec 15th, 2007, 01:38 PM
#3
Thread Starter
Hyperactive Member
Re: Passing a "new string"
Visual Studio .NET 2005/.NET Framework 2.0
-
Dec 15th, 2007, 04:31 PM
#4
Frenzied Member
Re: Passing a "new string"
I assume it would be the same as passing ""
-
Dec 15th, 2007, 09:45 PM
#5
Re: Passing a "new string"
That code is not creating a new String object. It's creating a new String array with one element. That code is equivalent to this:
vb.net Code:
Dim arr As String() = {"MaritalStatusChoices"}
ds.Load(dataReaderMaritalChoices, LoadOption.OverwriteChanges, arr)
The same result but less succinct.
Last edited by jmcilhinney; Dec 15th, 2007 at 09:53 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|