Reputation: 25141
Ive got a project that uses the Google .NET API.
It has a root namespace of 'Google' (unsuprisingly).
Ive just created a class with the following namespace
namespace Foo.Google{
class Bar{ }
}
Obviously this is now going to 'conflict' as Google
is ambiguous (precedence is actually given to Foo.Google
).
Other than just renaming Foo.Google
to Foo.Goog
, are then any other cleverer approaches?
Upvotes: 1
Views: 141
Reputation: 3136
(If I've understood the question correctly) cant you do something like:
using GoogleApi = Google;
Upvotes: 0
Reputation: 22624
No, there are no cleverer approaches. Avoiding namespaces conflicts by not using the same namespaces of the third party code which you use is the way to go.
Upvotes: 2
Reputation: 67090
You can import the Google .NET API using an alias (check reference properties).
Upvotes: 2