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

  • Home
  • SEARCH
  • 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 3854104
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T17:34:21+00:00 2026-05-19T17:34:21+00:00

I was recently using .net reflector to look at some DLL files, and I

  • 0

I was recently using .net reflector to look at some DLL files, and I noticed one was using hex instead of decimal for its array indexes.

public Random(int Seed)
{
    this.SeedArray = new int[0x38];
    int num2 = 0x9a4ec86 - Math.Abs(Seed);
    this.SeedArray[0x37] = num2;
    int num3 = 1;
    for (int i = 1; i < 0x37; i++)
    {
        int index = (0x15 * i) % 0x37;
        this.SeedArray[index] = num3;
        num3 = num2 - num3;
        if (num3 < 0)
        {
            num3 += 0x7fffffff;
        }
        num2 = this.SeedArray[index];
    }
    for (int j = 1; j < 5; j++)
    {
        for (int k = 1; k < 0x38; k++)
        {
            this.SeedArray[k] -= this.SeedArray[1 + ((k + 30) % 0x37)];
            if (this.SeedArray[k] < 0)
            {
                this.SeedArray[k] += 0x7fffffff;
            }
        }
    }
    this.inext = 0;
    this.inextp = 0x15;
    Seed = 1;
}

Why did the author use hex instead of decimal?

  • 1 1 Answer
  • 1 View
  • 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-19T17:34:21+00:00Added an answer on May 19, 2026 at 5:34 pm

    Whether an integer literal was originally written in source-code as hex or decimal (or, say, ternary, assuming the programming language supported it) doesn’t get written into the IL. What you’re seeing is a guess made by the decompiler.

    In fact, you might be able to see all of those literals in decimal by setting:

    View -> Options -> Disassembler -> Number Format : Decimal
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I recently did some performance testing and analysis of an ASP.NET application using out-of-process
I was recently writing some code to do WriteLine using a delegate in .NET
I've been using .NET Reflector for awhile but I've just recently switched machines and
I recently started looking into building web applications using .NET MVC and I stumbled
I am currently using ASP.NET MVC 2.0 RC2, having recently moved from version 1.0.
I've just recently started to build a web site using ASP.NET - MVC 4,
I've discovered recently that when using the Session or Application objects within an ASP.net
I'm using an Ajax update panel and have recently added ASP.NET tracing code to
I recently looked into some .NET memory leaks (i.e. unexpected, lingering GC rooted objects)
We recently moved all our tests from NUnit to MsTest. We are using Spring.NET

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.