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 955745
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T00:26:00+00:00 2026-05-16T00:26:00+00:00

As many of you will be aware, I can use the DataContract attribute to

  • 0

As many of you will be aware, I can use the DataContract attribute to mark a class for serialization into XML in a WCF service.

For example, I can create a DataContract thus:

< DataContract() > Public Class fooClass
< Datamember() > Public fooString as String
End Class

When I add a service reference to the code that will receive this DataContract, I see that the class generated by the designer has fooString as a public property with a backing field. My question is, why does the designer use a backing field? I don’t see any reason not to access fooString directly.

  • 1 1 Answer
  • 1 View
  • 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-16T00:26:01+00:00Added an answer on May 16, 2026 at 12:26 am

    It is code design “standard” style used by MS. And is for a good reason to use properties instead of public fields. Even if on server side you will have data contract like this :

    [DataContract]
    class MyComplexType
    {
       [DataMember]
       public int id;
       [DataMember]
       public string name;  
    } 
    

    In client proxy class you will have them as backing fields named something like idField, nameField…

    So it is not connected to WCF itself it is matter of why to use properties instead of public fields for which you can easily find guidance.

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

Sidebar

Related Questions

In my project many clients will modify a map in server. I use a
I use VIM editor for PHP, i know many people will point to PDT
I found that there are many frameworks that will check the duplicate class name
As many of you will be aware, animating PNG's with alpha transparency in <IE8
I'd like to expose some functionality via a WCF service. I can configure WCF
I dont know how many values will be present from Cell A1 to A65555.
I came across the following question : How many times will the following for
I'm setting up a database using PHPMyAdmin and many fields will be large chunks
Many PHP systems will implement object types (such as Models) that allow a client
In many ViewModels I will need a collection from another ViewModel. Basically each VIewModel

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.