Class with property referenced with dll not serializing
- by djerry
Hey guys,
I got this class TapiCall. It has 4 properties : 2 datetimes, 1 string and an object. The object is a class that's referenced by Atapi3.dll, so i cannot alter it. My class TapiCall looks like this :
[DataContract]
public class TapiCall
{
private DateTime start, end;
private TCall call;
private string status;
[DataMember]
public string Status
{
get { return status; }
set { status = value; }
}
[DataMember]
public TCall Call
{
get { return call; }
set { call = value; }
}
[DataMember]
public DateTime End
{
get { return end; }
set { end = value; }
}
[DataMember]
public DateTime Start
{
get { return start; }
set { start = value; }
}
public TapiCall()
{
}
public TapiCall(DateTime start, DateTime end, TCall call)
{
this.Start = start;
this.End = end;
this.Call = call;
}
}
Now when i use my visual studio command line, to generate my proxy class, it generates an error. When i remove TapiCall from the method in my app, i can rebuild my proxy again, so i know
[OperationContract]
void StuurUpdatedCall(TapiCall tpCall);
is causing the problem. My question now is can i Serialize a class that's referenced by a dll?
Thanks in advance.