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

  • Home
  • SEARCH
  • 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 8315807
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T21:12:55+00:00 2026-06-08T21:12:55+00:00

Basically, should the code below work and serialize string Yoyo when an object of

  • 0

Basically, should the code below work and serialize string Yoyo when an object of type YoyoData is returned over the wire.

    public interface IHelloV1
    {
        #region Instance Properties

        [DataMember(Name = "Yoyo")]
        string Yoyo { get; set; }

        #endregion
    }


    [DataContract(Name = "YoyoData", Namespace = "http://hello.com/1/IHelloV1")]
    public class YoyoData : IHelloV1
    {
        string Yoyo { get; set; }

        public YoyoData()
        {
            Yoyo = "whatever";
        }
    }
}
  • 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-06-08T21:12:56+00:00Added an answer on June 8, 2026 at 9:12 pm

    I don’t think it will.

    The DataMember attribute is not inherited in derived classes.

    For more details see documentation of type DataMemberAttribute and how it is defined : http://msdn.microsoft.com/en-us/library/system.runtime.serialization.datamemberattribute.aspx.
    This attribute specifies the property Inherited = false meaning the attribute won’t be propagated to derived classes.

    Also see http://msdn.microsoft.com/en-us/library/84c42s56(v=vs.71).aspx for more details concerning the Inherited property on attributes.

    Anyway, this means that in your class defining the DataContract, the property Yoyo won’t be considered a DataMember so for me it will just not work as expected.

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

Sidebar

Related Questions

Please see the code below. Basically, when the user creates an object of this
Basically the below code should simply be a white page with a shadow around
Basically I've got a code which should load a lot of images so I
here is the code: http://jsfiddle.net/hQnXm/7/ So basically i need when hover, it should animate
I'm learning Ajax at the moment. The code below basically receives the echo from
basically I'm trying to get #toggle_box to slide down using Jquery, the code below
Here I have a piece of code that should work based on what I
So basically in this code I placed below there is a couple things I
the code i have below basically behaves as a friend search engine where you
Basically, I don't understand why the code below will output 434 when 4.35 *

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.