In this article, I will tell you how to eliminate the "collection already contains an address Exception" in WCF.
To understand this in depth you need to create a website that contains a WCF service.
Step 1: Create a ASP.NET website named "WCF_Website".
Step 2: Add a WCF service named "MyService" to it.
Step 3: Add an "operation contract" into the interface of the WCF service.
[OperationContractint Add(int a , int b);
[OperationContract]
int Add(int a , int b);
Step 4: Implement the entire interface in the "MyService" class and return the addition of both input values.
public int Add(int a, int b)
{
return a + b;
}







Join the conversation! Your thoughts help the community grow.