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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T06:13:04+00:00 2026-06-17T06:13:04+00:00

Possible Duplicate: Why are the properties of anonymous types in C# read-only? I wrote

  • 0

Possible Duplicate:
Why are the properties of anonymous types in C# read-only?

I wrote something like this,

 var suspense = new { Name = "Android", Market = string.Empty };
 suspense.Market = "Potential";

.NET throws error

Property or indexer ‘AnonymousType#1.Market’ cannot be assigned to —
it is read only

I know that AnonymousTypes in C# are immutable, but why? Is this due to some limitation with CLR?

  • 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-17T06:13:05+00:00Added an answer on June 17, 2026 at 6:13 am

    The motivating factor for driving the immutable anonymous types was because the LINQ APIs used hash tables internally and returning projections of anonymous types that could be modified was a dangerous situation.

    You can check :

    Immutable types: understand their benefits and use them

    Anonymous Types and Object Identities By Tim Ng on MSDN

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

Sidebar

Related Questions

Possible Duplicate: Can Read-Only Properties be Implemented in Pure JavaScript? I have an Object
Possible Duplicate: Properties vs Methods For many situations it is obvious whether something should
Possible Duplicate: JavaScript losing “this” object reference with private/public properties Why does the second
Possible Duplicate: How can I read the properties of a C# class dynamically? I
Possible Duplicate: C#: Public Fields versus Automatic Properties Duplicate? I think not: This question
Possible Duplicate: Do write-only properties have practical applications? A getter without a setter makes
Possible Duplicate: Accessing properties of an array of objects Given: [{ 'id':1, 'name':'john' },{
Possible Duplicate: Public Fields versus Automatic Properties I figured this would be answered someplace,
Possible Duplicate: Properties and Instance Variables in Objective-C 2.0 I'm using properties only for
Possible Duplicate: How to access object properties with names like integers? I tried to

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.