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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T20:31:40+00:00 2026-05-13T20:31:40+00:00

I am debugging a code and one strange thing occurs. There is a string

  • 0

I am debugging a code and one strange thing occurs. There is a string property say MyProperty. When I add breakpoint at the setter of the property and at the default constructor ( The only constructor ) the setter is called first. I dont know what is going on at other level of the code but this seems strange to me in any case. All the members are non static. The class has a [DataContract] attribute and members are [DataMember]. Can anybody explain this?

I cannot share any more code than this. Also the code is in a Silverlight project.

  • 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-13T20:31:40+00:00Added an answer on May 13, 2026 at 8:31 pm

    Is this during WCF deserialization? In WCF deserialization, the constructor isn’t called at all. That’s by design. WCF objects are designed to be data transport objects, and any logic that resides behind setters and getters is dangerous at best. Chances are, you’re seeing this behavior and concerned about it because you have something going on in business logic that resides in the setter. To work around this, I’d suggest decorating only automatic properties and fields with the [DataMember] attribute, which will prevent any other logic from being triggered. Also, be careful of any logic that would be performed in the constructor, that logic won’t be executed during deserialization.

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

Sidebar

Related Questions

One of my pet peeves with debugging Perl code (in command line debbugger, perl
There I was happily debugging my code, when I did a restart, and even
we noticed a rather strange behavior on one of our web applications. When debugging
The Delphi debugger is great for debugging linear code, where one function calls other
while i'm debugging my app there is some strange things. In some point the
This is a strange one, I have everything working but in the controller code
I have this strange problem. When debugging, I have sometimetimes code looking like this
I'm having a strange problem when debugging some java code with eclipse (Version: Helios
This is more of a hypothetical whilst I'm debugging some code. Lets say I
I was debugging some code today and noticed one of my FileInfo objects had

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.