On 9 May 2012 15:34, Ed Leafe <[email protected]> wrote:
> On May 9, 2012, at 9:21 AM, MB Software Solutions, LLC wrote:
>
>> I recently saw (both in our stuff here and in Ken Getz' video for this
>> training) that they had all these get/set lines and I wondered why?
>> (And I think Stephen posted such too, iirc) I vaguely recall learning
>> that VB6 classes had to have _Get and _Set methods to their properties.
>> Guess that continues the tradition.
>
> But that's exactly the sort of inelegance I mean. I'll wager that
> 99.9% of code created does nothing special with these getter/setter methods;
> they simply get/set the value unchanged. So in order to handle the few cases
> where code is needed, you are stuck with all this useless baggage.
No, you're not. This works fine:
public class myclass
{
string Field1;
bool Field2;
}
However, these are fields, rather than properties.
--
Paul
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message:
http://leafe.com/archives/byMID/profox/CADwx0+KwB7aBFrf9Rc2sqAwpZUDHM4S_+zyZDfSD=ffj5or...@mail.gmail.com
** All postings, unless explicitly stated otherwise, are the opinions of the
author, and do not constitute legal or medical advice. This statement is added
to the messages for those lawyers who are too stupid to see the obvious.