N
news.microsoft.com
Hi,
I am using structs and am also using property accessors to access those
private member fields... TO me this is a good way of handling them, but I
find alot of people using direct access to the struct memebers, since
structs is just a type similar to a class (with differences I know) why
should I allow direct access like that... I looked at the Size and other
parts on Control etc and I find its the same way by using property
accessors.
Seems to me people think struct = direct access, small, and easy.. Its just
a type like all the rest (except with differences i Know blah blah) but why
why why allow direct access. its just lazyness.. Code it once, and thats it,
where is the saving? I mean if its coded well in the first place then you
dont have to keep engineering it so its not exactly a lot of work to use
those extra lines..
I also find ppl balk at the concept of using parameterized constructors and
methods in a struct, theyre just not thinking .NET , and are thinking the
old way of structs on C. The object is still lightweight even tho there are
methods, properties, and constructors..
I just hate lazy coding.
/End gripe.
I am using structs and am also using property accessors to access those
private member fields... TO me this is a good way of handling them, but I
find alot of people using direct access to the struct memebers, since
structs is just a type similar to a class (with differences I know) why
should I allow direct access like that... I looked at the Size and other
parts on Control etc and I find its the same way by using property
accessors.
Seems to me people think struct = direct access, small, and easy.. Its just
a type like all the rest (except with differences i Know blah blah) but why
why why allow direct access. its just lazyness.. Code it once, and thats it,
where is the saving? I mean if its coded well in the first place then you
dont have to keep engineering it so its not exactly a lot of work to use
those extra lines..
I also find ppl balk at the concept of using parameterized constructors and
methods in a struct, theyre just not thinking .NET , and are thinking the
old way of structs on C. The object is still lightweight even tho there are
methods, properties, and constructors..
I just hate lazy coding.
/End gripe.