Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 186933
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T15:44:04+00:00 2026-05-11T15:44:04+00:00

This is a C# question. I was just wandering if anyone tried storing their

  • 0

This is a C# question.

I was just wandering if anyone tried storing their data (like config files for example), in the *.cs file, instead of XML?

I really hate XML. The whole idea of parsing html-like structure every time you need some data seems stupid.

Are there lightweight alternatives (like YAML) to XML? In my case I actually need to store some data for a (game) Level, where there are a lot of different objects, terrain types, etc… in a flat file, so I can read it later.

I guess I could serialize my Level class, but I want the data-file to be EDITABLE in any text editor for example.

Any help would be welcome, thanks!

PS: Regarding .cs files, I forgot to mention that I want the ability to create (and save) new levels in game, through an editor.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T15:44:04+00:00Added an answer on May 11, 2026 at 3:44 pm

    Since you don’t want to use XML, I’d recommend creating your own file format that is text editable.

    PROPERTIES name = First Level number = 1 END  MONSTERS Barbarian pos = (3, 6) health = 2  Dragon pos = (10, 10) health = 8 END 

    and so on so forth for whatever else you need.

    Creating a parser yourself is really straight forward. Pretty much just read in the file line by line. At the first line, you see the title is PROPERTIES so you then read in properties until you read in the END line. Same thing for any other headers you’d have. There are many ways you can vary this, so you can make the syntax however you want it to be.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is more of a generic question to be honest, just wondering if anyone
I was wondering if anyone could answer me this quick question. I tried searching
I feel like this might be a crazy question, and if anyone has a
This is just a short question, I don't really have an example but the
Simple question. Just wondering if this can be done without me having to enforce
I think this is just a Best Practices question, but I was wondering if
Ok, this might just be a dumb question, but I was wondering if Bluetooth
Please do not mark it as a dupe of this question just yet: Bold
This question is just for a sake of knowledge. I don't have any practical
This question is just out of interest, and perhaps could be useful for my

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.