Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Global namespace reference #1380

Closed
Anupheaus opened this issue Dec 5, 2014 · 1 comment
Closed

Global namespace reference #1380

Anupheaus opened this issue Dec 5, 2014 · 1 comment
Labels
Duplicate An existing issue was already created

Comments

@Anupheaus
Copy link

I think we need something like

global::

that C# has to access the root namespace.

I am currently having difficulty with a class named View within the global namespace and another class named View in a particular namespace. Unfortunately, the class named View within the namespace uses the class named View in the global namespace, and the only way I can find to make this work at the moment is to create another variable called DataTypeView that is set to the View class in this way:

var DataTypeView = View;

But unfortunately, this doesn't work with generics, i.e. I can't do this:

var myValue = someGenericTypeMethod<DataTypeView>();

DataTypeView does not exist as a type to the intellisense (perhaps this is a bug or maybe I should be doing something else to make this work?).

@Anupheaus
Copy link
Author

Sorry, just found this: #983

@RyanCavanaugh RyanCavanaugh added the Duplicate An existing issue was already created label Dec 12, 2014
@microsoft microsoft locked and limited conversation to collaborators Jun 18, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Duplicate An existing issue was already created
Projects
None yet
Development

No branches or pull requests

2 participants