Declaration question 
Author Message
 Declaration question

Hi,

Which is better?

1. Dim o as New Object

2. Dim o as Object = New Object

TIA



Mon, 27 Sep 2004 12:01:08 GMT  
 Declaration question
Declare:

Dim o as Object

In before it is used:

Set o = New Object

In the termination of its use:

Set o = Nothing

HTH

Max Bolingbroke


Quote:
> Hi,

> Which is better?

> 1. Dim o as New Object

> 2. Dim o as Object = New Object

> TIA



Mon, 27 Sep 2004 13:47:13 GMT  
 Declaration question
Crumbs, sorry that was a VB6 answer!

Check newsgroup title, check newsgroup title.

Yes, so anyway, ignore me :)

Max Bolingbroke



Mon, 27 Sep 2004 13:49:13 GMT  
 Declaration question
John,

Quote:
>Which is better?

There is no difference, they do exactly the same thing. I prefer #1
since it requires less typing.

Mattias

===
Mattias Sj?gren (VB MVP)

http://www.msjogren.net/dotnet/



Mon, 27 Sep 2004 15:55:33 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Arrays: Declaration question...

2. General declaration question

3. couple simple vb declaration questions

4. CursorType and LockType declaration question

5. Object declaration question

6. Declaration Question

7. Newbie DLL declaration question

8. Declaration question

9. Class Declaration Question

10. tool to convert VC Dll functions declarations to VB declarations

11. Simple question about Private-declarations

 

 
Powered by phpBB® Forum Software