Click here to Skip to main content
15,923,689 members
Home / Discussions / C#
   

C#

 
GeneralRe: Database validation Pin
DaveyM692-Feb-08 0:30
professionalDaveyM692-Feb-08 0:30 
GeneralRe: Database validation Pin
DaveyM693-Feb-08 0:05
professionalDaveyM693-Feb-08 0:05 
GeneralOK that's a new one (strange use of colon operator) Pin
Jasmine25011-Feb-08 11:14
Jasmine25011-Feb-08 11:14 
GeneralRe: OK that's a new one (strange use of colon operator) Pin
Guffa1-Feb-08 11:22
Guffa1-Feb-08 11:22 
GeneralRe: OK that's a new one (strange use of colon operator) Pin
led mike1-Feb-08 11:27
led mike1-Feb-08 11:27 
GeneralRe: OK that's a new one (strange use of colon operator) Pin
Pete O'Hanlon1-Feb-08 11:37
mvePete O'Hanlon1-Feb-08 11:37 
GeneralRe: OK that's a new one (strange use of colon operator) Pin
Colin Angus Mackay1-Feb-08 14:42
Colin Angus Mackay1-Feb-08 14:42 
GeneralRe: OK that's a new one (strange use of colon operator) Pin
Jasmine25012-Feb-08 14:09
Jasmine25012-Feb-08 14:09 
I guess in my particular case, it didn't make a lot of sense because, for this particular class, it's the same as:
public SearchCriteria() {
m_year = 2000;
m_month = 1;
}

And in my mind this is much more readable and efficient. If the thing was doing more work with the values, I could understand the use of this construct.

The other constructor looks like:
public SearchCriteria(int yr, int mo) {
m_year = yr;
m_month = mo;
}

I think it's some contractor's idea to getting more hours, making the code harder to read, and hoping that the company will be dependent on him in the future. I'm seeing quite a few things which are obviously that kind of trick, but this one got me interested as to whether there was a good reason for it or not. This particular class is way overblown... it's one of those classes that could have just as easily been a struct, because it doesn't actually do any processing, it's only an object to aggregate some values together and it never actually does anything with those values besides store them.

"Quality Software since 1983!"
http://www.smoothjazzy.com/ - see the "Programming" section for freeware tools and articles.

GeneralRe: OK that's a new one (strange use of colon operator) Pin
peterchen2-Feb-08 14:42
peterchen2-Feb-08 14:42 
GeneralRe: OK that's a new one (strange use of colon operator) Pin
Jasmine25012-Feb-08 20:16
Jasmine25012-Feb-08 20:16 
QuestionA More Generic Way? Pin
#realJSOP1-Feb-08 10:46
professional#realJSOP1-Feb-08 10:46 
AnswerRe: A More Generic Way? Pin
leppie1-Feb-08 10:57
leppie1-Feb-08 10:57 
GeneralRe: A More Generic Way? Pin
#realJSOP1-Feb-08 11:04
professional#realJSOP1-Feb-08 11:04 
GeneralRe: A More Generic Way? [modified] Pin
Pete O'Hanlon1-Feb-08 11:30
mvePete O'Hanlon1-Feb-08 11:30 
GeneralRe: A More Generic Way? Pin
leppie1-Feb-08 11:31
leppie1-Feb-08 11:31 
GeneralRe: A More Generic Way? Pin
Pete O'Hanlon1-Feb-08 11:33
mvePete O'Hanlon1-Feb-08 11:33 
GeneralRe: A More Generic Way? Pin
leppie1-Feb-08 11:39
leppie1-Feb-08 11:39 
GeneralRe: A More Generic Way? Pin
leppie1-Feb-08 11:40
leppie1-Feb-08 11:40 
GeneralRe: A More Generic Way? Pin
Pete O'Hanlon1-Feb-08 11:41
mvePete O'Hanlon1-Feb-08 11:41 
GeneralRe: A More Generic Way? Pin
leppie1-Feb-08 11:47
leppie1-Feb-08 11:47 
GeneralRe: A More Generic Way? Pin
PIEBALDconsult1-Feb-08 13:00
mvePIEBALDconsult1-Feb-08 13:00 
GeneralRe: A More Generic Way? Pin
#realJSOP2-Feb-08 0:46
professional#realJSOP2-Feb-08 0:46 
GeneralRe: A More Generic Way? Pin
Pete O'Hanlon3-Feb-08 0:01
mvePete O'Hanlon3-Feb-08 0:01 
GeneralRe: A More Generic Way? Pin
Pete O'Hanlon1-Feb-08 11:30
mvePete O'Hanlon1-Feb-08 11:30 
AnswerRe: A More Generic Way? Pin
PIEBALDconsult1-Feb-08 12:48
mvePIEBALDconsult1-Feb-08 12:48 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.