Data Files, Arrays, Struct?

  • Thread starter Acidon Purplehaze
  • Start date
A

Acidon Purplehaze

[Warning: C# Newb Questions, may cause headaches and/or Migraines]

Hello all. I'm in the process of learning C# with no books, until I
can buy a book on it.

I am creating a small game while I learn it, just for my own
enjoyment. Right now I am trying to create a small editor to edit the
"Monsters". I will have 100 monster records that I want to save into
a binary file.

In VB, this was a no brainer, at least for me. I defined a struct in
a separate .bas file that has all of the mob information. I then
loaded the monster records into a series of arrays, editted the
monsters, saved the file again.

I need some direction to do this in C#. Where do I define the Struct?
Can I use a separate file to do this to keep it clean?

I'm just looking for some direction here. I am hoping to buy a book
on it soon, but atm i don't have one. Any help is greatly
appreciated. Thanks in advance.

Acidon
 
J

Justin Rogers

Serialization and the BinaryFormatter are what you are looking for in this case.
That'll let you define your structs, create your arrays, and write them out.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top