Click here to Skip to main content
16,016,067 members
Home / Discussions / C#
   

C#

 
GeneralRe: Work on a new thread locks the GUI Pin
SimpleData18-Sep-09 10:00
SimpleData18-Sep-09 10:00 
GeneralRe: Work on a new thread locks the GUI Pin
Manas Bhardwaj18-Sep-09 10:07
professionalManas Bhardwaj18-Sep-09 10:07 
GeneralRe: Work on a new thread locks the GUI Pin
Luc Pattyn18-Sep-09 10:03
sitebuilderLuc Pattyn18-Sep-09 10:03 
GeneralRe: Work on a new thread locks the GUI Pin
Manas Bhardwaj18-Sep-09 10:08
professionalManas Bhardwaj18-Sep-09 10:08 
QuestionIE automation , image save Pin
yogesh_softworld12318-Sep-09 9:01
yogesh_softworld12318-Sep-09 9:01 
QuestionMissed events when using vb6 Activex in C# Pin
Member 533181818-Sep-09 8:07
Member 533181818-Sep-09 8:07 
QuestionHow to change 'this' Pin
RichardM118-Sep-09 7:45
RichardM118-Sep-09 7:45 
AnswerRe: How to change 'this' Pin
Ian Shlasko18-Sep-09 8:00
Ian Shlasko18-Sep-09 8:00 
Changing "this" isn't really what you're asking for. If I'm reading this correctly, what you really want to do is overwrite one object's memory with another, so references don't have to be changed.

I would actually advise against this... It would be much easier to do with a simple wrapper class.
public class MyDataObject
{
  // All other parts of the program would refer to this object

  public SerializableObject Data { get; set; }

  public class SerializableObject
  {
    // This would be the object you serialize and deserialize,
    // using the normal method calls.
  }
}

So all of your references would be to the instance of MyDataObject, and those would never change... When you deserialize, you set the Data property to the new object, and it works as well as a direct replacement.

If you want to make it more transparent, you can hide the inner object entirely, and make methods and properties in the wrapper that pass through to the inner object.

Proud to have finally moved to the A-Ark. Which one are you in?
Developer, Author (Guardians of Xen)

QuestionGlobal Variables... Pin
JollyMansArt18-Sep-09 7:09
JollyMansArt18-Sep-09 7:09 
AnswerRe: Global Variables... Pin
Vikram A Punathambekar18-Sep-09 7:16
Vikram A Punathambekar18-Sep-09 7:16 
AnswerRe: Global Variables... Pin
PIEBALDconsult18-Sep-09 7:51
mvePIEBALDconsult18-Sep-09 7:51 
AnswerRe: Global Variables... Pin
Ian Shlasko18-Sep-09 8:14
Ian Shlasko18-Sep-09 8:14 
QuestionBackgroundworker Pin
arkiboys18-Sep-09 7:05
arkiboys18-Sep-09 7:05 
AnswerRe: Backgroundworker Pin
Luc Pattyn18-Sep-09 7:11
sitebuilderLuc Pattyn18-Sep-09 7:11 
AnswerRe: Backgroundworker Pin
Luc Pattyn18-Sep-09 7:39
sitebuilderLuc Pattyn18-Sep-09 7:39 
AnswerRe: Backgroundworker Pin
Ian Shlasko18-Sep-09 8:19
Ian Shlasko18-Sep-09 8:19 
QuestionEnumerate a Listbox Pin
bxlorenz18-Sep-09 7:04
bxlorenz18-Sep-09 7:04 
AnswerRe: Enumerate a Listbox Pin
Luc Pattyn18-Sep-09 7:09
sitebuilderLuc Pattyn18-Sep-09 7:09 
QuestionCopy Files in C# with Duplicate Files (Corrupt ISO) Pin
Xtrodinary18-Sep-09 6:30
Xtrodinary18-Sep-09 6:30 
AnswerRe: Copy Files in C# with Duplicate Files (Corrupt ISO) Pin
jared.hildebrandt21-Oct-09 5:16
jared.hildebrandt21-Oct-09 5:16 
QuestionNo connection could be made because the target machine actively refused it Pin
Amritarth18-Sep-09 6:06
Amritarth18-Sep-09 6:06 
AnswerRe: No connection could be made because the target machine actively refused it Pin
EliottA18-Sep-09 6:31
EliottA18-Sep-09 6:31 
AnswerRe: No connection could be made because the target machine actively refused it Pin
Luc Pattyn18-Sep-09 6:31
sitebuilderLuc Pattyn18-Sep-09 6:31 
AnswerRe: No connection could be made because the target machine actively refused it Pin
Dave Kreskowiak18-Sep-09 7:27
mveDave Kreskowiak18-Sep-09 7:27 
AnswerRe: No connection could be made because the target machine actively refused it Pin
0x3c018-Sep-09 7:40
0x3c018-Sep-09 7:40 

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.