Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hi,

 

Can you tell me when we deed to use 'New'

Dim New ... or just Dim?

Posted

I think when you use New when Dimming an object it actually creates an instance of that object all in one line, as opposed to VB6 when you would two lines:

 

Dim Object as Object

Set Object as new Object

Posted

'One line' can also be used in VB6, for example:

 

Dim c As New Collection

c.Add ("1234")

Print c(1)

Posted
Yes it can, but not for objects. It depends on whether you are declaring variables objects. Our company has moved over to C# now as it's .Net language of choice. I must spend sometime to check out VB.Net too! :)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...