|
by: smith |
last post by:
I've been making deep copy clones of objects since my second week or so with
..Net (it took me the first week to realize that shallow copies were usually
worthless as "clones").
Normally I call my method "Clone" ... it's just a naming habit I got into
with VB5/6 using LSET on UDTs for serializing state and creating copies of
objects.
The way I do it is of course with .Net is the wya most everyone does it,
mark the class with the...
|
by: Hasani |
last post by:
I have an object called FileNode and it implements ICloneable which creates
a deep copy of the FileNode.
The one of the constructors for ArrayList use an ICollection as a paremeter.
If I pass that constructor an array of type FileNode, when it copies the
FileNode array, will it call Clone on each FileNode object, or just do a
MemberwiseClone of each FileNode?
I'm hoping that in the constructor they do somethine like try casting each...
|
by: Andy |
last post by:
Hello.
I've got an issue with the ICloneable interface that makes me think I'm
missing the advantages of it.
My issue is that the implemented Clone method returns an object and not
a strongly typed definition. This means that the class you create
exposes a method that returns an object which the user of the class must
cast.
|
by: Venkat Venkataramanan |
last post by:
Hello:
I have an object Users that implements the ICloneable
interface.
I am trying to pass an instance of this object, foUser
from one form into a second form ByRef.
Dim formLogin As New frmLogin(foUser)
|
by: Don |
last post by:
Can anyone give me an example of implementing ICloneable to give a class I
created a "Clone" method so I can make copies of objects. I have no idea
where to begin with this. Thanks.
- Don
|
|
by: Michael D. Ober |
last post by:
In VB 2005, the ICloneable interface requires the following:
Class foo
Implements ICloneable
Public Function Clone() as Object Implements System.ICloneable.Clone
' return new_object of type foo
End Function
End Class
|
by: Rain |
last post by:
Hi. Im a C# newbie, just want to ask how to implement the ICloneable.Clone..
Dont know how it works, would really appreciate it if someone could show a
simple source sample of how to do this.. Thank you so much!
|
by: Nathan |
last post by:
I'm working with Clone() for the first time, and noticed that you have to
unbox the Clone of an object that implements ICloneable:
MyObject var1 = new MyObject(); // Where MyObject implements ICloneable
MyObject va3 = (MyObject)var1.Clone();
Does anyone know why the 2.0 framework doesn't include a Generic
implementation of the ICloneable interface?
|
by: Stefan Hoffmann |
last post by:
hi,
the following implementations work:
public class NullSafeCollection: System.Collections.CollectionBase,
System.ICloneable
{
object System.IClonable.Clone()
{
NullSafeCollection clone = new NullSafeCollection();
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
|