CFanatic

Go Back   CFanatic > Programming > C# Programming

Join CFanatic Forum Now

Question about Serialized Objects and file streams topic posted under C# Programming which is a part of Programming category in CFanatic Forum
Reply
 
Thread Tools Display Modes
  #1  
Old 09-06-2010, 05:41 AM
Junior Member
 
Join Date: Sep 2010
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
argv is on a distinguished road
| More
Question about Serialized Objects and file streams

Hello!

I'm pretty new to C#, just learning it on my own from what I know between Java and C++/C. The term "serialization" is new to me, although I know what it means.

I'm making a small program that simply takes some daily log information about some daily happenings, and writes them to a (binary) file, which can later be opened and viewed via a listbox on the bottom of the form.


Here is my question:

I assume that the "deserialize" method de-serializes the WHOLE stream. I want to break it into chunks that are the size of my class (like you would in C or C++), so I can write each individual entry down.

However, in C++ you would use the reinterpret_cast(&instance), sizeof(object) to tell the program the size of "chunk" you want. C# doesn't appear to have that going on, and I haven't found anything that helps yet online. (I'm searching even as I'm writing this). How would I accomplish this "chopping up" of my data stream in c#?

thank you in advance, and have a great day!

-argV
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Initializing array of objects bojomojo C# Programming 0 08-28-2010 03:11 AM
C# objects AxeSlash C# Programming 0 08-28-2010 03:00 AM
Creating Objects inspiration C Programming 4 03-27-2010 09:23 PM
External files and streams inspiration C++ Programming 4 03-24-2010 09:04 PM
Why .NEt objects in Heap coderzone C# Programming 0 06-04-2007 11:23 AM

 

Advertisement

CFanatic Search
Custom Search

Advertisement

All times are GMT -5. The time now is 04:01 PM.



Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO ©2010, Crawlability, Inc.
Cfanatic.com is a premier member of the IDG TechNetwork. For advertising opportunities contact here
Get Paid for Working on Projects Matching Your Expertise at Go4Expert's Jobs Board