Re: List<> of struct with property. Cannot change value of property. why?
- From: Zytan <zytanlithium@xxxxxxxxx>
- Date: 14 May 2007 11:43:33 -0700
I guess this could be shortened to:
list[index].MethodThatChangesStructsFields();
Confirmed. This operates on the COPY, and any changes are lost, and
the compiler does NOT warn about this.
Zytan
.
- Follow-Ups:
- Re: List<> of struct with property. Cannot change value of property. why?
- From: Jon Skeet [C# MVP]
- Re: List<> of struct with property. Cannot change value of property. why?
- References:
- Prev by Date: Re: Tracking a memory leak.
- Next by Date: Re: best way to enumerate List<> & remove unwanted elements?
- Previous by thread: Re: List<> of struct with property. Cannot change value of property. why?
- Next by thread: Re: List<> of struct with property. Cannot change value of property. why?
- Index(es):