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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T11:13:34+00:00 2026-05-30T11:13:34+00:00

What does the global:: stand for in C#? for example what is the difference

  • 0

What does the global:: stand for in C#? for example what is the difference between

private global::System.Int32 myInt;

and

private int myInt;

Thanks

  • 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-30T11:13:36+00:00Added an answer on May 30, 2026 at 11:13 am

    It’s the “global” namespace – it forces the compiler to look for a name without taking other using directives into consideration. For example, suppose you had:

    public class Bar{}
    
    namespace Foo
    {
        public class Bar {}
    
        public class Test
        {
            static void Main()
            {
                Bar bar1 = null; // Refers to Foo.Bar
                global::Bar bar2 = null; // Refers to the "top level" Bar
            }
        }
    }
    

    Basically it’s a way of avoiding naming collisions – you’re most likely to see it in tool-generated code, where the tool doesn’t necessarily know all the other types in the system. It’s rarer to need it in manually-written code.

    See “How to: Use the global namespace alias” on MSDN for more details, along with the :: namespace qualifier.

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

Sidebar

Related Questions

Under what circumstances does the following example return a local x versus a global
In this example, does correctness require global_value to be declared volatile ? int global_value
assume that we have enough global memory. Does replacing int with short improve the
VB 6.0 does not have any global handler.To catch runtime errors,we need to add
Why does the array a not get initialized by global variable size ? #include<stdio.h>
What does 'this' keyword refer to when used in global object? Let's say for
I always hear using global variables are dangerous. Does this apply to Drupal? Take
Hello: Does Global Work Size (Dimensions) Need to be Multiple of Work Group Size
I am new to Matlab and have difficulty understanding global variables. For example global
The name 'Global' does not exist in the current context I'm getting the above

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.