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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T10:27:22+00:00 2026-06-06T10:27:22+00:00

What determines the order of classes within an Assembly? And.. is there a way

  • 0

What determines the order of classes within an Assembly?

And.. is there a way to change it?


Additional info: you can check the ordering either through reflection yourself, or you can use a tool like ILDASM, disable the alphabetical sorting, and then you will also get the order.

Order seems to be in a strange way determined by the compiler.

I already tried some things.. like renaming the classes (order stays the same), also editing the .csproj file to change the order of the .cs files.

My main focus is VS2008, C#, .net 3.5.


Update: I do have a scenario where the order matters (external program going through my assembly through reflection) – and I need special order there.
Apart from this – you are totally right – order really should not matter.

  • 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-06-06T10:27:24+00:00Added an answer on June 6, 2026 at 10:27 am

    I’m going to stick my neck out here and say this is an implementation detail and may well be decided by any particular compiler.

    Since this is an implementation detail you shouldn’t or needn’t be concerned. Of course if this really is important (can’t see why) you can always write your own IL.

    I leave you with the following quote from Eric’s blog:

    Is compiling the same C# program twice guaranteed to produce the same
    binary output?

    No.

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

Sidebar

Related Questions

Is there a rule in CSS that determines the cascading order when multiple classes
How can I change the order of the entries in the context menu?(e.g. for
In Visual Studio 2008, what determines the order in which projects appear within a
What determines the order that multiple DepdencyProperties on the same control get evaluated in?
I'm trying to build a sequence that determines the order to destroy objects. We
Question : Is there a static way to reliably determine the type contained by
I'm trying to understand what determines the order in which event handlers are triggered
How do you change controls' Z-order in MFC at design time - i.e. I
In order to determine what low-level framework types a web application is directly using,
I'm using an if statement in order to determine if an element has any

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.