Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7510713
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T23:18:25+00:00 2026-05-29T23:18:25+00:00

Im following a guide which tell me to create a simple class file and

  • 0

Im following a guide which tell me to create a simple class file and add following code

[DataContract]

public class Footballers
{
[DataMember]
public string FirstName { get; set; }

[DataMember]
public string LastName { get; set; }

[DataMember]
public DateTime BirthDate { get; set; }

}

I get an error around [datacontract] and [datamember] saying type or namespace can not be found.

Firstly I guess what namespace do Need to include ?
Secondly are these things necessary ?
Lastly what do they do, I have never seen them in a class file before ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T23:18:26+00:00Added an answer on May 29, 2026 at 11:18 pm

    If you’re using Visual Studio, right click on DataContract or DataMember, you should see Resolve at the top of the context menu, it’ll let you automatically add the namespace to the using declarations at the top of the file.

    These attributes are necessary for creating data type that will be exposed via a WCF service.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've read the guide , which tells you to do the following: create a
I'm following this guide: http://www.math.umd.edu/~dcarrera/ruby/0.3/chp_01/programs.html and I'm trying to create my first ruby program.
The following code snippet is from The Official GNOME 2 Developer's Guide : GMemChunk
Setup Using MVC 3 + Code First Here are my classes public class Member
Hi I was following code igniter user guide for forms and I encountered this
I've followed the guide which is excellent, however, when I add has_secure_password to my
I am trying to create a Nuget package from my project following this guide
I've been following this guide for the HandleError attribute: blogs.msdn.com which I use like
I've been following the guide in the following ( StackOverflow question ), which has
i was following the guide http://appfuse.org/display/APF/Using+Struts+2 to make a simple appfuse site, but i

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.