As I did my research on this issue, I still could not solve my error Error 1 Could not find the name of the type or namespace DataMember (do you miss the using directive or the assembly reference?)
I came across a solution which says that I should reference System.Runtime.Serialization , but still I was out of luck, even if I add a link to it.
Here is my code:
using System; using System.Linq; using System.Collections.Generic; using System.Text; using System.Runtime.Serialization; using System.Xml.Serialization; namespace WebServApp { [Serializable] public class Employee { [DataMember] public int EmpNo { get; set; } [DataMember] public string EmpName { get; set; } [DataMember] public int DeptNo { get; set; } [DataMember] public int Salary { get; set; } } }
and this is the tutorial that I'm actually trying to execute: http://www.dotnetcurry.com/ShowArticle.aspx?ID=472
Can someone help me with this error?
source share