How To Use Struct in WCF as a DataContract ? Using Struct as a DataContract in WCF? | WCF Interview Question

, ,
An example of using struct as a DataContract is given below

[DataContract]

struct EmployeeInfo

{

[DataMember]

public int id;



[DataMember]

public string name;



[DataMember]

public DateTime joining_date;

}