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 3605922
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T21:11:03+00:00 2026-05-18T21:11:03+00:00

I have a dictionary like the follow: public Dictionary<int, SpawnList> spawnEntities = new Dictionary<int,

  • 0

I have a dictionary like the follow:

public Dictionary<int, SpawnList> spawnEntities = new Dictionary<int, SpawnList>();

The class being used is as follow:

    public class SpawnList
    {
        public int NpcID { get; set; }
        public string Name { get; set; }
        public int Level { get; set; }
        public int TitleID { get; set; }
        public int StaticID { get; set; }

        public entityType Status { get; set; }

        public int TypeA { get; set; }
        public int TypeB { get; set; }
        public int TypeC { get; set; }

        public int ZoneID { get; set; }
        public int Heading { get; set; }
        public float PosX { get; set; }
        public float PosY { get; set; }
        public float PosZ { get; set; }
    }

/// <summary>Entity type enum.</summary>
public enum entityType
{
    Ally,
    Enemy,
    SummonPet,
    NPC,
    Object,
    Monster,
    Gatherable,
    Unknown
}
  • How could I save this Dictionary to
    either a binary or encrypted format
    so I could later Load it again into
    my application ?

    My biggest problem here is not on how to save the file it self or encrypt it but mostly on how to do it when you have a class with it and how you go about deserializing it later.

My limitation is .Net 3.5 can’t use anything higher.

  • 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. Editorial Team
    Editorial Team
    2026-05-18T21:11:03+00:00Added an answer on May 18, 2026 at 9:11 pm

    The easy way to get you started:

    1. Make your class serializable by attaching the [Serializable] attribute.
    2. Use CryptoStream and BinaryFormatter to serialize it into a file and encrypt the data.

    The reference for CryptoStream provides a complete example for setting up encryption and doing the related file handling.

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

Sidebar

Related Questions

I have table named 'Dictionary' with columns as follow: ID bigint TYPE varchar (200)
In my class Case I have an IDictionary with Entity (a class) as key
I've got a standard 'dynamic dictionary' type class in C# - class Bucket :
I'm having a hard time understanding this regex stuff... I have a string like
I'm trying to write an extension method to insert data into a dictionary of
I have a view to create a user as follows. <% using (Html.BeginForm(SaveUser, Security))
Earlier today I asked a question about passing dictionary values to a function. While
Anyone pretty familiar with FTP 7.5 extensibility in IIS know what I might be
I've created my own custom pseudo enumerations within my domain model to allow me
I've got an object that handles in memory caching for my data access layer

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.