The Artima Developer Community
Sponsored Link

C# Answers Forum
Need help with read and Birnay File !!!

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Ho Ngoc Hung

Posts: 4
Nickname: hongochung
Registered: Mar, 2004

Need help with read and Birnay File !!! Posted: Mar 15, 2004 2:04 AM
Reply to this message Reply
Advertisement
I have this Class
public class MyClass{
public string User = "",
Task = "";
DateTime dtTime = DateTime.Now;
}

I have some objects like:
MyClass cl1 = new MyClass();
cl1.User = "Mr A";
cl1.Task = "Paint floor";
cl1.dtTime = DateTime.Now;

MyClass cl2 = new MyClass();
cl2.User = "Mr B";
cl2.Task = "Driving";
cl2.dtTime = DateTime.Now.AddDay(-1);

Can anyone show me a way to write two above objects (cl1, cl2) to a binary file,
and then read them from that file to two new MyClass Objects (c1, c2)

thanks

Topic: CSP Previous Topic   Next Topic Topic: Why it does not work if disable local network???

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use