Abhijit Shelar
Abhijit Shelar

Reputation: 1065

Conflict in namespace in C#

If my namespace is

Cytel.GlobalSettings.ChartSetting

and I have a static class ChartSetting

packed in dll.

then when I use ChartSetting class in other project it shows red color with Chartsetting class's method and public members are not shown

Upvotes: 1

Views: 56

Answers (1)

David M
David M

Reputation: 72840

It is interpreting your reference to ChartSetting as a reference to the namespace. You should use the fully qualified name of the ChartSetting static class. If it has an empty namespace, then you will need to use the global qualifier thus:

global::ChartSetting

You can also specify an alias to this class:

using MyAlias = global::ChartSetting;

Upvotes: 2

Related Questions