Click here to Skip to main content
16,010,544 members
Home / Discussions / C#
   

C#

 
GeneralPrinting Pin
Mazdak27-Mar-02 1:41
Mazdak27-Mar-02 1:41 
GeneralRe: Printing Pin
Rüpel27-Mar-02 1:52
Rüpel27-Mar-02 1:52 
GeneralRe: Printing Pin
Mazdak27-Mar-02 1:56
Mazdak27-Mar-02 1:56 
Generalstring array Pin
Mazdak26-Mar-02 21:27
Mazdak26-Mar-02 21:27 
GeneralRe: string array Pin
SimonS26-Mar-02 21:48
SimonS26-Mar-02 21:48 
GeneralRe: string array Pin
Mazdak26-Mar-02 22:09
Mazdak26-Mar-02 22:09 
Generalbackup Pin
BLaZiNiX26-Mar-02 19:01
BLaZiNiX26-Mar-02 19:01 
GeneralRe: backup Pin
James T. Johnson26-Mar-02 23:10
James T. Johnson26-Mar-02 23:10 
That all depends on how your program is structured Smile | :)

If you are just starting what I would do is create a single class or struct that represents one file in the back up. Give it the Serializable attribute and implement ISerializable.

When you implement ISerializable there are two things you must do: 1) provide a GetObjectData method, which puts the data into the serialization stream (ie a file) 2) provide a constructor that takes the same parameters as GetObjectData, except this takes the data out of the file and loads your class.

When you serialize the class (GetObjectData is called) store the original path/filename and then load the contents of the file in there. When you deserialize the class (the constructor is called) you pull out the original path/filename and then take the data out of the stream and place it in the file.

Then all your program has to do is manage these objects Smile | :)

James

Sonork ID: 100.11138 - Hasaki
"I left there in the morning
with their God tucked underneath my arm
their half-assed smiles and the book of rules.
So I asked this God a question
and by way of firm reply,
He said - I'm not the kind you have to wind up on Sundays."
"Wind Up" from Aqualung, Jethro Tull 1971

GeneralRe: backup Pin
BLaZiNiX27-Mar-02 15:35
BLaZiNiX27-Mar-02 15:35 
GeneralRe: backup Pin
James T. Johnson27-Mar-02 18:09
James T. Johnson27-Mar-02 18:09 
QuestionDynamically assign QueryString to SRC? Pin
26-Mar-02 13:02
suss26-Mar-02 13:02 
AnswerRe: Dynamically assign QueryString to SRC? Pin
David Wengier26-Mar-02 13:18
David Wengier26-Mar-02 13:18 
GeneralRe: Dynamically assign QueryString to SRC? Pin
26-Mar-02 13:44
suss26-Mar-02 13:44 
GeneralRe: Dynamically assign QueryString to SRC? Pin
David Wengier26-Mar-02 13:52
David Wengier26-Mar-02 13:52 
GeneralMatlab & C# Pin
26-Mar-02 8:25
suss26-Mar-02 8:25 
QuestionCapturing Cursor Keys? Pin
Zombies with Coffee, LLC26-Mar-02 7:54
professionalZombies with Coffee, LLC26-Mar-02 7:54 
AnswerRe: Capturing Cursor Keys? Pin
James T. Johnson26-Mar-02 8:11
James T. Johnson26-Mar-02 8:11 
GeneralRe: Capturing Cursor Keys? Pin
Zombies with Coffee, LLC26-Mar-02 8:17
professionalZombies with Coffee, LLC26-Mar-02 8:17 
QuestionDynamic C# dll components? Pin
Filip Strugar26-Mar-02 7:32
Filip Strugar26-Mar-02 7:32 
AnswerRe: Dynamic C# dll components? Pin
Filip Strugar26-Mar-02 7:42
Filip Strugar26-Mar-02 7:42 
GeneralRe: Dynamic C# dll components? Pin
James T. Johnson26-Mar-02 7:46
James T. Johnson26-Mar-02 7:46 
GeneralRe: Dynamic C# dll components? Pin
Filip Strugar26-Mar-02 8:13
Filip Strugar26-Mar-02 8:13 
GeneralRe: Dynamic C# dll components? Pin
James T. Johnson26-Mar-02 12:35
James T. Johnson26-Mar-02 12:35 
GeneralRe: Dynamic C# dll components? Pin
Filip Strugar28-Mar-02 7:39
Filip Strugar28-Mar-02 7:39 
GeneralDeriving combobox Pin
Marc L'Ecuyer26-Mar-02 5:05
Marc L'Ecuyer26-Mar-02 5: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.