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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T17:35:58+00:00 2026-05-31T17:35:58+00:00

I currently have a helper class that I am using to obfuscate a static

  • 0

I currently have a helper class that I am using to obfuscate a static class that keeps track of high scores in a game I am working on. I am using Eazfuscator on my release and found that when my scores were being serialized, this exception was thrown:

ArgumentException Identifier ‘ ‘ is not CLS-compliant

Is there a way I can store my list of high scores in my helper class and still be able to serialize it after obfuscation?

try
{
  GameHighScore highScoreHelper = new GameHighScore();
  highScoreHelper.CreateGameHighScore(highScore);

  XmlSerializer serializer = new XmlSerializer(typeof(GameHighScore));
  serializer.Serialize(stream, highScoreHelper);
}
catch(Exception e)
{
  Logger.LogError("Score.Save", e);
}

My helper class:

  public class GameHighScore
  {
    
    public List<HighScoreStruct<string, int>> highScoreList;

    private HighScoreStruct<string, int> scoreListHelper;

    [XmlType(TypeName = "HighScore")]
    public struct HighScoreStruct<K, V>
    {
      public K Initials
      { get; set; }

      public V Score
      { get; set; }

      public HighScoreStruct(K initials, V score) : this() 
      {
        Initials = initials;
        Score = score;
      }
    }

    public GameHighScore()
    {
      highScoreList = new List<HighScoreStruct<string, int>>();
      scoreListHelper = new HighScoreStruct<string, int>();
    }

    public void CreateGameHighScore(List<KeyValuePair<string, int>> scoreList)
    {

      for (int i = 0; i < scoreList.Count; i++)
      {
        scoreListHelper = new HighScoreStruct<string, int>(scoreList[i].Key, scoreList[i].Value);
        highScoreList.Add(scoreListHelper);
      }
    }
  }
  • 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-31T17:35:59+00:00Added an answer on May 31, 2026 at 5:35 pm

    Best solution would be not to obfuscate classes needed for any kind of serialization. You’ll gain 2 benefits of doing so:

    • no strange names will be used for classes
    • re-running obfuscation will not produce new names for the same classes/fields.

    Most obfuscators allow to specify attributes that keep particular classes/methods non-obfuscated.

    Otherwise – write your own serialization.

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

Sidebar

Related Questions

I currently have a class file with the following enumeration: using System; namespace Helper
I have a question that keeps bothering me. Currently, I have started using Kohana
I have written some extension methods that extend the html helper class for client
I'm working on an asp.net MVC application. I have a class that wraps a
I'm currently working on a high-traffic online search site. They have various changes they
We currently have multiple .NET projects that we have developed using Visual Studio. Each
I'm writing a project in c# asp.net mvc3, and I have a helper-class that
I'm using JMagick and have a simple Java class that loops over all images
I currently have an MS Access application that connects to a PostgreSQL database via
I currently have an existing database and I am using the LINQtoSQL generator tool

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.