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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T17:59:59+00:00 2026-05-27T17:59:59+00:00

Possible Duplicate: Are automatically generated GUIDs for types in .NET consistent? I want to

  • 0

Possible Duplicate:
Are automatically generated GUIDs for types in .NET consistent?

I want to use Type as a key dictionary, but I’d rather use either full type name or Type.GUID. How reliable and correct is Type.GUID for this task?

Ayende Rahien writes:

Can you rely on System.Type.GUID to be stable?

By stable I mean that it will generate the same value for the same type across compilations. Empirical evidence suggest that this is the case, with the following factors determining the Guid of a type:

  • Type name (including the namespace)
  • Assembly name
  • Assembly public key

Reflectoring into the system, it turns out that System.Type.GUID is
eventually translated to a call to System.RuntimeType.GetGUID, this is
one of the scary InternallCall method that are implemented directly in
the runtime itself.

I wonder…

  • 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-27T17:59:59+00:00Added an answer on May 27, 2026 at 5:59 pm

    From the documentation at http://msdn.microsoft.com/en-us/library/system.type.guid.aspx.

    The purpose of Type.GUID is to get the value associated with the class using [Guid("...")]. However, it also returns a guid when this attribute is not associated. The problem is where it gets this. A small test shows that the guid is stable. I checked the guid of a class, and verified that it changed when I renamed the class. When I renamed the class back, I got the original guid again. However, since these guids appear out of thin air, they shouldn’t be trusted to be stable over time, releases, framework versions, etc.

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

Sidebar

Related Questions

Possible Duplicate: Android: automatically choose debug/release Maps api key? I use MapView in my
Possible Duplicate: Why not use tables for layout in HTML? Under what conditions should
Possible Duplicate: .NET - What’s the best way to implement a catch all exceptions
Possible Duplicate: When you exit a C application, is the malloc-ed memory automatically freed?
Possible Duplicate: Multiple Inheritance in C# In the following example, I want the Shirt
Possible Duplicate: How to automatically start your service after install? I have a Visual
Possible Duplicate: Auto-open NERDTree in “EVERY” tab Is there a way to automatically execute
Possible Duplicate: Automatically re-direct a user when session Times out or goes idle… I
Possible Duplicate: How to internationalize a java web application. greetings all i want that
Possible Duplicate: Automatically plot different colored lines in MATLAB I have the following data

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.