Click here to Skip to main content
15,888,461 members
Home / Discussions / C#
   

C#

 
QuestionHow 2 Change Screen Resolution Of Multi Monitors! Pin
majidbhutta1-Sep-05 17:20
majidbhutta1-Sep-05 17:20 
AnswerRe: How 2 Change Screen Resolution Of Multi Monitors! Pin
Dario Solera1-Sep-05 21:44
Dario Solera1-Sep-05 21:44 
QuestionHow to open an Excel File using C# Application. Pin
pubududilena1-Sep-05 16:48
pubududilena1-Sep-05 16:48 
AnswerRe: How to open an Excel File using C# Application. Pin
Robert Rohde1-Sep-05 20:00
Robert Rohde1-Sep-05 20:00 
QuestionHow can I darg-drop item to a WebBrowser control ? Pin
Member 19785851-Sep-05 16:03
Member 19785851-Sep-05 16:03 
QuestionVirtual Dispatching Pin
mpastchenko1-Sep-05 15:15
mpastchenko1-Sep-05 15:15 
AnswerRe: Virtual Dispatching Pin
leppie1-Sep-05 18:07
leppie1-Sep-05 18:07 
QuestionDeserialize - comments? Pin
peterchen1-Sep-05 13:34
peterchen1-Sep-05 13:34 
I'm looking for feedback if the following makes sense:

- I declared an Interface IDocument:
public interface IDocument
{
  bool IsDirty { get; }
  void Save(System.IO.Stream stream, bool resetDirty);
  void Load(System.IO.Stream stream);
}


A Helper class implementing the Open/Close/Save/SaveAs/AskForFilename UI should work wiht the document(s) through this interface.

I'm a bit uneasy with the Load/Deserialize design: DeSerialize returns an objec. This makes sense but:
- I can't have a static Load method in the interface
- doesn't allow to implement "Revert"

So I did implement Load the following way:

public void Load(System.IO.Stream stream)
{
  System.Xml.Serialization.XmlSerializer ser =
    new System.Xml.Serialization.XmlSerializer(typeof(RTDocument));

  RTDocument loaded = ser.Deserialize(stream) as RTDocument;

  // overwriting members-to-be-serialized with the data loaded:
  Root = loaded.Root;
  // ....
}


Is this exceptionally stupid? Some better way?



Pandoras Gift #44: Hope. The one that keeps you on suffering.
aber.. "Wie gesagt, der Scheiss is' Therapie"
boost your code || Fold With Us! || sighist | doxygen

AnswerRe: Deserialize - comments? Pin
leppie1-Sep-05 14:14
leppie1-Sep-05 14:14 
GeneralRe: Deserialize - comments? Pin
peterchen1-Sep-05 20:30
peterchen1-Sep-05 20:30 
GeneralRe: Deserialize - comments? Pin
Mathew Hall2-Sep-05 0:43
Mathew Hall2-Sep-05 0:43 
QuestionC#/.NET coding standards: private members Pin
peterchen1-Sep-05 13:11
peterchen1-Sep-05 13:11 
AnswerRe: C#/.NET coding standards: private members Pin
Christian Graus1-Sep-05 13:58
protectorChristian Graus1-Sep-05 13:58 
GeneralRe: C#/.NET coding standards: private members Pin
Mathew Hall2-Sep-05 1:03
Mathew Hall2-Sep-05 1:03 
GeneralRe: C#/.NET coding standards: private members Pin
Christian Graus4-Sep-05 10:23
protectorChristian Graus4-Sep-05 10:23 
AnswerRe: C#/.NET coding standards: private members Pin
Mathew Hall2-Sep-05 1:07
Mathew Hall2-Sep-05 1:07 
Questiondrag and drop scrolling Pin
xilefxilef1-Sep-05 10:20
xilefxilef1-Sep-05 10:20 
AnswerRe: drag and drop scrolling Pin
Judah Gabriel Himango1-Sep-05 10:27
sponsorJudah Gabriel Himango1-Sep-05 10:27 
Questioncan this be done in C# / .NET / WinForms? Pin
peterchen1-Sep-05 10:08
peterchen1-Sep-05 10:08 
AnswerRe: can this be done in C# / .NET / WinForms? Pin
Judah Gabriel Himango1-Sep-05 10:17
sponsorJudah Gabriel Himango1-Sep-05 10:17 
GeneralRe: can this be done in C# / .NET / WinForms? Pin
peterchen1-Sep-05 10:37
peterchen1-Sep-05 10:37 
GeneralRe: can this be done in C# / .NET / WinForms? Pin
Judah Gabriel Himango1-Sep-05 10:55
sponsorJudah Gabriel Himango1-Sep-05 10:55 
GeneralRe: can this be done in C# / .NET / WinForms? Pin
Mathew Hall2-Sep-05 1:15
Mathew Hall2-Sep-05 1:15 
AnswerRe: can this be done in C# / .NET / WinForms? Pin
hamster11-Sep-05 16:11
hamster11-Sep-05 16:11 
QuestionAccesing a xml Pin
BECK71-Sep-05 10:07
BECK71-Sep-05 10:07 

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.