|
Sander Rossel wrote: But still less vertical space!
public string Something
{
get { return _Something; }
set { _Something = value; }
} Where, exactly?
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
|
Yep, that's how I would write simple getters and setters. I only go multiline if there's some additional logic in there
How do you know so much about swallows? Well, you have to know these things when you're a king, you know.
modified 31-Aug-21 21:01pm.
|
|
|
|
|
In VB.NET you could type only
Public String Something
variable _Someting would be internally created and accessible without explicit definition. I don't know if they added it in C# too..
While there are more keywords, intellisense is better and there is actually less typing in vb version
|
|
|
|
|
|
VB? I see why you're ashamed!
veni bibi saltavi
|
|
|
|
|
expected ';'
|
|
|
|
|
When it is just so very easy?
Select Case word
Case "JULY"
Return 7
End Select
|
|
|
|
|
Maybe because if you used mixed case (July) it would fail, or be hard for the original author to determine what the issue was?
|
|
|
|
|
"because it requires a recompile to update the values"
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Nothing is removed from the snippet- it really can only deal with JULY.
|
|
|
|
|
Where is that sarcasm icon when it's needed most?
|
|
|
|
|
Maybe the TDDers never got round to writing the tests for other strings - therefore they weren't allowed to change it!
|
|
|
|
|
Almost each project has them.
It gets better if there's a concatenation going on of constants into a stringbuilder.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
|
That's the one to watch for these days..
Your product may only be intended to English speaking nations (although there are differences even between these), but eventually some bright spark of a salesman's going to drop everyone in it selling a version to Beijing or some other exotic location
How do you know so much about swallows? Well, you have to know these things when you're a king, you know.
modified 31-Aug-21 21:01pm.
|
|
|
|
|
oh, now this is fun.
July and july for starters, but you can have other languages as well. In dutch it's pretty straightforward "juli", but in French that becomes juillet, spanish=julio and croatian apparently returns "srpanj"
|
|
|
|
|
I challenge you to pronounce you if you're not slavic (I am, btw)
R in sRpanj is hard as when the russian speaks english in movies and nj is single letter pronounced like New without U
|
|
|
|
|
I did before I read your explanation, do I win a cookie?
If the brain were so simple we could understand it, we would be so simple we couldn't. — Lyall Watson
|
|
|
|
|
...and in polish: "lipiec"
|
|
|
|
|
I was a bit mystified why property change notifications (INotifyPropertyChanged ) were being raised for non-existent properties in our project.
Turns out some "bright spark" had the innovative idea of using them as a general event mechanism, presumably to save all the effort of declaring an event type.
I may have to persuade the company to buy all developers a copy of "Clean Code".
"If you don't fail at least 90 percent of the time, you're not aiming high enough."
Alan Kay.
|
|
|
|
|
|
A property doesn't have to be a Property to be a property .
|
|
|
|
|
What's the problem, if it compiles?
-> [ ]
There are two kinds of people in the world: those who can extrapolate from incomplete data.
|
|
|
|
|
Rob Grainger wrote: presumably to save all the effort of declaring an event type ehr..
For me it is a code-snippet in VS. Four seconds, five tops, tada, event. How much effort does declaring an event take at your company?
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|