Reputation: 213
I have a list of type A.Composite
and I add a service reference named ServiceA
. ServiceA
has a Composite
class, the same as A.Composite
.
My issue is that I cannot add the ServiceA.composite
object to the list because of the difference in the namespace. The first is A.Composite
and the second A.ServiceA.Composite
.
How can I deal with this problem?
Upvotes: 0
Views: 85
Reputation: 157136
ServiceA has a
Composite
class, the same asA.Composite
.
If the two classes are the exact same (it is just an object returned from the service, picked up in the client in the exact same code), you should include the assembly containing it in your service.
You can read more about it here. It explains how to reuse types shared between server and client.
Upvotes: 2
Reputation: 172628
You can create an alias name as global::Foo
. So at the top of your source file, just after you using statements, add like this
using AliasClass1=global::Foo.Class1;
Upvotes: 0