Click here to Skip to main content
15,929,504 members
Home / Discussions / C#
   

C#

 
AnswerRe: video indexer Pin
blackjack215015-Aug-08 1:41
blackjack215015-Aug-08 1:41 
AnswerRe: video indexer Pin
Manas Bhardwaj15-Aug-08 2:03
professionalManas Bhardwaj15-Aug-08 2:03 
QuestionAdd event to DataGridViewTextBoxColumn Pin
kaasir_214-Aug-08 22:32
kaasir_214-Aug-08 22:32 
AnswerRe: Add event to DataGridViewTextBoxColumn Pin
teejayem15-Aug-08 2:21
teejayem15-Aug-08 2:21 
Questionnetflow collector. Pin
Stephen Lintott14-Aug-08 22:31
Stephen Lintott14-Aug-08 22:31 
AnswerRe: netflow collector. Pin
leppie14-Aug-08 23:31
leppie14-Aug-08 23:31 
GeneralRe: netflow collector. Pin
Stephen Lintott14-Aug-08 23:35
Stephen Lintott14-Aug-08 23:35 
GeneralRe: netflow collector. Pin
leppie14-Aug-08 23:41
leppie14-Aug-08 23:41 
GeneralRe: netflow collector. Pin
Stephen Lintott14-Aug-08 23:46
Stephen Lintott14-Aug-08 23:46 
GeneralRe: netflow collector. Pin
leppie14-Aug-08 23:50
leppie14-Aug-08 23:50 
GeneralRe: netflow collector. Pin
Stephen Lintott15-Aug-08 1:01
Stephen Lintott15-Aug-08 1:01 
QuestionHow to deep-copy the ListCollectionView? Pin
Michael Sync14-Aug-08 22:30
Michael Sync14-Aug-08 22:30 
AnswerRe: How to deep-copy the ListCollectionView? Pin
leppie14-Aug-08 23:36
leppie14-Aug-08 23:36 
GeneralRe: How to deep-copy the ListCollectionView? Pin
Michael Sync14-Aug-08 23:41
Michael Sync14-Aug-08 23:41 
GeneralRe: How to deep-copy the ListCollectionView? Pin
leppie14-Aug-08 23:43
leppie14-Aug-08 23:43 
GeneralRe: How to deep-copy the ListCollectionView? Pin
Michael Sync14-Aug-08 23:48
Michael Sync14-Aug-08 23:48 
GeneralRe: How to deep-copy the ListCollectionView? Pin
leppie15-Aug-08 0:31
leppie15-Aug-08 0:31 
GeneralRe: How to deep-copy the ListCollectionView? Pin
Michael Sync15-Aug-08 18:44
Michael Sync15-Aug-08 18:44 
GeneralRe: How to deep-copy the ListCollectionView? Pin
N a v a n e e t h15-Aug-08 6:06
N a v a n e e t h15-Aug-08 6:06 
AnswerRe: How to deep-copy the ListCollectionView? Pin
Alaric_15-Aug-08 5:28
professionalAlaric_15-Aug-08 5:28 
(I'm not sure what a "ListCollectionView" is, but I can give some general information on creating a deep-copy of an object graph)

well...there are several approaches you could take. All have their pros and cons...here's one technique.

Mark all of your objects in your object graph with the Serializeable attribute. There are 2 noticeable cons to this technique: One- you have to mark each class individually, so there is a chance that one could be accidentally omitted. Two- You don't want to serialize objects that contain references to external resources (databaseConnections being a prime example)

Your procedure (in pseudo-code)

Create a BinaryFormatter
Create a MemoryStream to store the serialized buffer of your object graph
formatter.Serialize(buffer, source) //the only line of code I'll give
return the clone by Deserializing the buffer and applying a C-cast to the stream.
   The Serializeable attribute will take care of the rest

The objects in the graph DO NOT have to be ICloneable. The Serializeable attribute is all that is needed. You do, however need to mark anything that you do not want to be contained in the clone as Transient


"I need build Skynet. Plz send code"

GeneralRe: How to deep-copy the ListCollectionView? Pin
Michael Sync15-Aug-08 15:52
Michael Sync15-Aug-08 15:52 
QuestionEscaping Quotes Pin
maliary14-Aug-08 21:52
maliary14-Aug-08 21:52 
AnswerRe: Escaping Quotes Pin
blackjack215014-Aug-08 22:05
blackjack215014-Aug-08 22:05 
GeneralRe: Escaping Quotes Pin
maliary14-Aug-08 22:36
maliary14-Aug-08 22:36 
GeneralRe: Escaping Quotes Pin
Mycroft Holmes14-Aug-08 23:05
professionalMycroft Holmes14-Aug-08 23:05 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.