global::

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Marc

    global::

    What's the meaning of global:: in the following statement

    global::System. Data.DataTable employee = new DataTable("Empl oyee");
    My best guess is that it means the global namespace. But searching on
    'global' gives a lot of non relevant entries.

  • Jeroen Mostert

    #2
    Re: global::

    Marc wrote:
    What's the meaning of global:: in the following statement
    >
    global::System. Data.DataTable employee = new DataTable("Empl oyee");
    My best guess is that it means the global namespace. But searching on
    'global' gives a lot of non relevant entries.
    You'll usually see this in generated code. "global::" is just a way of
    saying you want to start name resolution from the root. This would be
    necessary, for example, if declared a nested namespace "System" of your own.

    --
    J.

    Comment

    • Marc

      #3
      Re: global::


      "Jeroen Mostert" <jmostert@xs4al l.nlschreef
      You'll usually see this in generated code.
      Right, I am experimenting with ASP.NET and that's were I saw it.

      Dankjewel.

      Comment

      • Guest's Avatar

        #4
        Re: global::

        Dankjewel.

        Leuk he al die hollanders :)

        Comment

        Working...