Dim statement for reference type variable

G

Guest

Is there any difference between the following Dim statements? I think they
are the same but which way is the correct (standard) way to declare and
initialize the object variable.

Dim DS as New DSTest
Dim DS as DSTest = New DSTest
 
G

Guest

Hi David,

Thanks for the posts. I'm new to .net. The help for Dim statement
actually mentions not to use Initializer if use New. Since I have seen both
type of Dim, I thought they may be different. But I guess what stated in
Help is not a requirement.


Peter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top