473,396 Members | 1,599 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

new object instace

I have a class. After instantiating that class, If I were to try and create
a copy of the instantiated object as a separate object, what is the easiest
way other than re-populating each and every object declared inside that
class.

Bilal Abbasi.
Nov 20 '05 #1
4 987
* "Bilal Abbasi" <ba*****@chadbourne.com> scripsit:
I have a class. After instantiating that class, If I were to try and create
a copy of the instantiated object as a separate object, what is the easiest
way other than re-populating each and every object declared inside that
class.


If you are talking about your own class, implement 'ICloneable'. Have a
Google Search (<http://www.deja.com>) for more info on how to implement
this interface.

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #2
"Bilal Abbasi" <ba*****@chadbourne.com> schrieb
I have a class. After instantiating that class, If I were to try and
create a copy of the instantiated object as a separate object, what
is the easiest way other than re-populating each and every object
declared inside that class.


According to the documentation, the event is not "made for the usage from
our code".
--
Armin

http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #3
"Armin Zingler" <az*******@freenet.de> schrieb

According to the documentation, the event is not "made for the usage
from our code".

Sorry, wrong thread. :-/
--
Armin

Nov 20 '05 #4
ICloneable Works. Thanks.
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:bq*************@ID-208219.news.uni-berlin.de...
* "Bilal Abbasi" <ba*****@chadbourne.com> scripsit:
I have a class. After instantiating that class, If I were to try and create a copy of the instantiated object as a separate object, what is the easiest way other than re-populating each and every object declared inside that
class.


If you are talking about your own class, implement 'ICloneable'. Have a
Google Search (<http://www.deja.com>) for more info on how to implement
this interface.

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>

Nov 20 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Bijay Kumar | last post by:
Hi Guys, I was going through the source code of Object.cs in rotor. What I found is Equals() implemented as follows: public extern virtual bool Equals(Object obj); What I don't...
0
by: Bijay Kumar | last post by:
Hi Guys, I was going through the source code of Object class (Object.cs in rotor). What I found is Equals() implemented as follows: public extern virtual bool Equals(Object obj); What...
4
by: Lucas Sain | last post by:
Hi, I think thta for this I have to use reflection... but I'm not shure. How can I find/get an object at runtime by looking for its name that is stored in a variable. For example: I have a...
17
by: Zeng | last post by:
I'm trying to comparing 2 objects (pointer to object) to see if they are the "same" as each other. Here is what the definition of being the "same" object type for both objects, object 1, ...
3
by: Claire | last post by:
Ive a static instance of an object in a class. It needs to be Dispose(d) of when it's finished with. How do I do this? Or don't I have to worry about it? Class myClass { private static...
5
by: Pross | last post by:
I've got an ASP.NET application and I need some information on every page like the user's name as well as a collection listing which sections of the application the user has access to. I could...
3
by: Jesper | last post by:
Hi, I've made a class with the following operator overloads listed below. However, If I test a 'pointer' for an instace, I get an exception that the object is not set to an insstance of an...
2
by: Beffmans | last post by:
Hi When I run this code: using System; namespace DelegateProject { public delegate void MyDelegate(string s);
26
by: yb | last post by:
Hi, Is there a standard for the global 'window' object in browsers? For example, it supports methods such as setInterval and clearInterval, and several others. I know that w3c standardized...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
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,...
0
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
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,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.