As I have done my research regarding this problem of mine, I still have no luck in solving my error of Error 1 The type or namespace name \'DataMember\' could not be
Remove System.Runtime.Serialization from code, then add from menu > Project > Add reference ..> . Then again add into code. it works.
System.Runtime.Serialization