- Feature Articles
- CodeSOD
- Error'd
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
http://en.wikipedia.org/wiki/C_Sharp_(programming_language)#Name
Admin
That's even worse then. Giving a language a name that can't even be rendered on a standard keyboard has to be a pretty tasty little WTF all of its own.
Admin
The fact that the property setter has the same syntax before MSIL interpretation than the assignment operator and that most property setters do assign a value to a field can be confusing, but The Entepriser's point is valid as long as you don't mix up different things just because they look the same. A setter is just C# eye candy for a method:
A method being something different than an operator:
Admin
Mistook you for someone else. Soz.
Admin
The only "reference" that wikipedia gives us for that myth is the blog of a criminal vigilante!
Admin
x = 1 * 2 + 3 x = 1 * c1.randomfield + 3 x = 1 * c1.randomproperty + 3
These all evaluate in the same order. I substituted a property for a field because you cannot get a differentiating behavior from a field. It does not invalidate the results.
Admin
The result of a simple assignment expression is the value assigned to the left operand. The result has the same type as the left operand, and is always classified as a value. (ECMA 334, June '06 version, section 14.14.1 para 2.)
You can also demonstrate to yourself that it is not allowed to reread the value from the left operand through my example with a volatile field.
Admin
wasnt so hard: http://www.microsoft.com/en-us/netmf/default.aspx
Admin
Admin
The real WTF here is they already named this the "bait and switch". What poor client are they abusing?!
captcha - illum as in shining light on the matter!
Admin
Properly dialectic code!
Admin
Schrödinger explains it all...
Admin
Oh, so that's what Write Only Memory is for.
Admin
The sad thing is, I've had to deal with this. I recently made a bugfix to a relatively large, poorly maintained codebase by adding one line of code:
void DoHorriblyLongProcess() { ....snip.... HostName = HostName; ....snip.... }