Login  
Search All Forums
Dart Home | PowerTCP Sockets for .NET | Custom Development Reply | PowerTCP Sockets for .NET (Secure and Standard) Topics | Forums   
AuthorForum: PowerTCP Sockets for .NET (Secure and Standard)
Topic: Passing TCP objects
cambler

From: Redmond, WA USA
Posts: 102
Member Since: 04/14/03
posted July 15, 2004 8:04 PM

If I have a class that takes a tcp object as a parameter to the constructor, should I pass it by reference, or is there a proper copy constructor for the class?
K M Drake



From: Utica, NY USA
Posts: 3406
Member Since: 07/14/00
posted July 19, 2004 10:53 AM

Hi,
If you pass the component as a parameter into a class, the class will use that instance, whether it is passed by value or ref.

As far as I know, you would have to create a new instance within the class, and pass the values of the original's properties to it, in order to create a deep copy.
 
-ken
cambler

From: Redmond, WA USA
Posts: 102
Member Since: 04/14/03
posted July 19, 2004 12:17 PM

Thanks, that's exactly what I needed to know.
Reply | PowerTCP Sockets for .NET (Secure and Standard) Topics | Forums   
This site is powered by PowerTCP WebServer Tool PowerTCP WebServer for ActiveX