constructor with arguments 
Author Message
 constructor with arguments

I have heared Visual Basic would now be able to handle constructors with
arguments, but I am not finding anything in the documentation. Can
someboddy give me a hint?
Sincerely,
Magnus


Mon, 21 May 2001 03:00:00 GMT  
 constructor with arguments
The VB Class Initialize event cannot be called externally (it's Private),
so arguments would be a bit superfluous.

Just make your own constructor routine, with any arguments you like.

Jim Deutch
MS Dev MVP



Quote:
> I have heared Visual Basic would now be able to handle constructors with
> arguments, but I am not finding anything in the documentation. Can
> someboddy give me a hint?
> Sincerely,
> Magnus



Mon, 21 May 2001 03:00:00 GMT  
 constructor with arguments

Quote:

>I have heared Visual Basic would now be able to handle constructors with
>arguments, but I am not finding anything in the documentation. Can
>someboddy give me a hint?

No, what you heard was not accurate. The Initialize event of a class does
not allow any parameters, even in VB6.

A common workaround is to write your own Init method that does take
parameters.

Frank Carr



Mon, 21 May 2001 03:00:00 GMT  
 constructor with arguments
Magnus,

Quote:
>I have heared Visual Basic would now be able to handle constructors with
>arguments, but I am not finding anything in the documentation. Can
>someboddy give me a hint?

Unfortunately, VB doesn't support this. Although I've wished many times that
it would.

--
Jonathan Wood
SoftCircuits Programming
http://www.softcircuits.com



Tue, 22 May 2001 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. ProcessStartInfo.Arguments - multiple arguments?

2. WScript.Arguments won't parse double-quotes within arguments

3. Arguments : Passing Arguments containing <">

4. Can CreateInstance work without the class having a no-argument constructor?

5. Do Vba classes have constructors?

6. list constructor as shown in the Table wizard?

7. Constructors?

8. font constructor exception: overflow or underflow

9. creating constructors

10. Byte constructors

11. Inherentance and Constructors

12. Private Constructor

 

 
Powered by phpBB® Forum Software