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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T06:30:52+00:00 2026-06-08T06:30:52+00:00

I was working with Guid.NewGuid() in C# , .NET 4.0 . And I’ve found

  • 0

I was working with Guid.NewGuid() in C# , .NET 4.0 . And I’ve found interesting fact: every Guid I’ve generated has ‘4’ at 13 position.

da1471ac-11f7- 4 fb7-a7fa-927fffe8a97c
c90058aa-5d7f- 4 bb5-b3a9-c1db197cf3b1
fa68ec75-8cd2- 4 c24-92f8-41dbbdd428a0
d4efd455-e892- 4 3ef-b7bf-9462c5dc4de4
e0a001a0-8969- 4 092-b7a2-e410ed2b351a
30ae98b9-48ae- 4 25d-b6e7-e091502d6ce2
6a95de82-67ff- 4 4c9-9f7b-e37a80462cf7
66768e46-6d60- 4 2b4-b473-2f6f8bc1559a

I’ve tried it on several machines and have the same result.
Can anybody try it too or explain it?

Simple code for checking:

static void Main(string[] args)
{
     bool ok = false;
     for (int i = 0; i < 10000; i++)
     {
         var guid = Guid.NewGuid();
         if (guid.ToString()[14] != '4')
             ok = true;
         Console.WriteLine(guid);
     }
     Console.WriteLine(ok ? "No bug!" : "4bug founded!");
}
  • 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-08T06:30:54+00:00Added an answer on June 8, 2026 at 6:30 am

    This is indeed the case and not a bug, it’s a feature. It specifies what method was used to generate the GUID. In the case of 4, those GUIDs are generated randomly.

    Eric Lippert has a fantastic series on this topic:

    Part One
    Part Two
    Part Three

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

Sidebar

Related Questions

Working with an undisclosed API, I found a function that can set the number
Vim doesn't have a built-in GUID generator. For the project I'm working on, I
I am scratching my head as to why not this isn't working: @if (Model.Guid
I'm working on a sample project built from the ASP.NET Web Application template (web
I'm working with an ASP.net web application. I've written a user control called LocationSelector
I'm working on an asp.net c# application that sends an email with one attachment.
I'm working on a project that's a .NET extension to a rather large classic
I'm working on a database in SQL Server 2000 that uses a GUID for
I'm currently working on someone else's database where the primary keys are generated via
Working on a small game using an HTML5 canvas, and javascript. And it's working

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.