I am adding a reference to a web service. In the web service I have a class named CustomerRecord. I have a method named GetCustomerData() which returns an array of CustomerRecord class.
The project which will consume the webservice also has CustomerRecord class.This is an exact representation of the one in Web Service.
Now when I use the web service, there are 2 CustomerRecord classes.This leads to ambiguous reference error.
The simple solution would be to rename one of them. But if you can’t do that then you still have two options.
Remove the using from the top of the file that references both CustomerRecord classes, and simply refer to it using the full namespace.
Or, in that same file, use using to alias one of them, just for that file.