Click here to Skip to main content
15,886,074 members
Home / Discussions / C#
   

C#

 
GeneralRe: Need some newbie C# help. Need dock a form to another form. Pin
Gaul28-Sep-02 13:08
Gaul28-Sep-02 13:08 
GeneralRe: Need some newbie C# help. Need dock a form to another form. Pin
Luis Alonso Ramos30-Sep-02 4:16
Luis Alonso Ramos30-Sep-02 4:16 
GeneralControl.Invalidate() Pin
Nnamdi Onyeyiri27-Sep-02 22:52
Nnamdi Onyeyiri27-Sep-02 22:52 
GeneralRe: Control.Invalidate() Pin
James T. Johnson28-Sep-02 5:02
James T. Johnson28-Sep-02 5:02 
Questioncan any body tell the syntex of reading and writing an object into file? Pin
imran_rafique27-Sep-02 16:09
imran_rafique27-Sep-02 16:09 
AnswerRe: can any body tell the syntex of reading and writing an object into file? Pin
Nnamdi Onyeyiri27-Sep-02 22:49
Nnamdi Onyeyiri27-Sep-02 22:49 
GeneralRe: can any body tell the syntex of reading and writing an object into file? Pin
imran_rafique28-Sep-02 15:22
imran_rafique28-Sep-02 15:22 
GeneralRe: can any body tell the syntex of reading and writing an object into file? Pin
Nnamdi Onyeyiri28-Sep-02 22:46
Nnamdi Onyeyiri28-Sep-02 22:46 
im not quite sure what a hash table is, but im sure its held within one object. If you require to store more than one object in the file, simple create a structure that holds all the various types of information, and serialize that.

this is how you use FileStream
using System.IO;
using System.Runtime.Formatters.Binary;
...
public object LoadFile(string filename)
{
   Stream stream = new FileStream(filename, FileMode.Open);
   BinaryFormatter bf = new BinaryFormatter();
   object obj = bf.Deserialize(stream);
   stream.Close();
   return obj;
}

public void SaveFile(string filename, object data)
{
   Stream stream = new FileStream(filename, FileMode.Create);
   BinaryFormatter bf = new BinaryFormatter();
   bf.Serialize(stream, data);
   stream.Close();
}
Simple. Smile | :)


Suspicious | :suss: Email: theeclypse@hotmail.com   URL: http://www.onyeyiri.co.uk
Suspicious | :suss: "All programmers are playwrights and all computers are lousy actors."


GeneralRe: can any body tell the syntex of reading and writing an object into file? Pin
imran_rafique29-Sep-02 15:49
imran_rafique29-Sep-02 15:49 
GeneralRe: can any body tell the syntex of reading and writing an object into file? Pin
Nnamdi Onyeyiri29-Sep-02 20:59
Nnamdi Onyeyiri29-Sep-02 20:59 
GeneralVFW in C# Pin
Jarrett Vance27-Sep-02 10:43
Jarrett Vance27-Sep-02 10:43 
GeneralRe: VFW in C# Pin
Stephane Rodriguez.27-Sep-02 22:29
Stephane Rodriguez.27-Sep-02 22:29 
GeneralRe: VFW in C# Pin
Daniel Strigl29-Sep-02 20:15
Daniel Strigl29-Sep-02 20:15 
GeneralWindows Form Designer Pin
Nnamdi Onyeyiri27-Sep-02 8:38
Nnamdi Onyeyiri27-Sep-02 8:38 
GeneralRe: Windows Form Designer Pin
leppie27-Sep-02 9:15
leppie27-Sep-02 9:15 
GeneralRe: Windows Form Designer Pin
Nnamdi Onyeyiri27-Sep-02 9:26
Nnamdi Onyeyiri27-Sep-02 9:26 
GeneralRe: Windows Form Designer Pin
Maciej Pirog27-Sep-02 9:48
Maciej Pirog27-Sep-02 9:48 
GeneralRe: Windows Form Designer Pin
leppie27-Sep-02 9:55
leppie27-Sep-02 9:55 
GeneralRe: Windows Form Designer Pin
Nnamdi Onyeyiri27-Sep-02 10:13
Nnamdi Onyeyiri27-Sep-02 10:13 
GeneralRe: Windows Form Designer Pin
leppie27-Sep-02 10:38
leppie27-Sep-02 10:38 
GeneralRe: Windows Form Designer Pin
Nnamdi Onyeyiri27-Sep-02 11:17
Nnamdi Onyeyiri27-Sep-02 11:17 
GeneralRe: Windows Form Designer Pin
leppie28-Sep-02 1:53
leppie28-Sep-02 1:53 
GeneralRe: Windows Form Designer Pin
Tomas Petricek27-Sep-02 11:08
Tomas Petricek27-Sep-02 11:08 
GeneralRe: Windows Form Designer Pin
Nnamdi Onyeyiri27-Sep-02 12:03
Nnamdi Onyeyiri27-Sep-02 12:03 
GeneralRe: Windows Form Designer Pin
leppie27-Sep-02 13:36
leppie27-Sep-02 13:36 

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.