I'm facing really strange error while debugging my program. I have a data contract where I added new properties but one of them cause the following exception:
Method not found: 'Void Measurement.set_ContactId(Int32)'.
The data contract looks following:
[DataContract]
public class Measurement
{
[DataMember]
public int FactId { get; set; }
[DataMember]
public int ContactId { get; set; }
.....
I don't really understand what can be a problem since, as I said, I added some other properties but there was no problem with them.
UPD: The exception is happening on the service side when I try to assign a value to ContactId
:
foreach (Measurement m in result.Where(m => m.FactId == factId)){
m.ContactId = contactId;
.....
set_ContactId(Int32)
method in yourMeasurement
class?ContactId
declared. Plus, if I try to add it, I get an error:Method with the same signature is already declared.
public int FactId
...{get;set;}