Tuesday, 27 August 2013

#define to resolve namespace clashes

#define to resolve namespace clashes

I have several WCF services that share classes but because of the way WCF
works, these classes are all seen as new and different classes.
Question: Is there a way to use C#'s #define to nicely resolve the clashes
in a more readable way?
Can I do something like
#define Dog global::My_Project.DogServiceReference.Dog
So that I can then do
List <Dog> dogs = ...
instead of
List<global::My_Project.DogServiceReference.Dog>

No comments:

Post a Comment