Click here to Skip to main content
15,898,134 members
Home / Discussions / C#
   

C#

 
GeneralRe: Learning C# Pin
Christian Graus15-Feb-07 8:09
protectorChristian Graus15-Feb-07 8:09 
GeneralRe: Learning C# Pin
starcraft4ever15-Feb-07 11:09
starcraft4ever15-Feb-07 11:09 
GeneralRe: Learning C# Pin
hairy_hats14-Feb-07 23:34
hairy_hats14-Feb-07 23:34 
GeneralRe: Learning C# Pin
moon_stick15-Feb-07 1:36
moon_stick15-Feb-07 1:36 
GeneralRe: Learning C# Pin
hairy_hats15-Feb-07 2:39
hairy_hats15-Feb-07 2:39 
GeneralRe: Learning C# Pin
starcraft4ever15-Feb-07 7:05
starcraft4ever15-Feb-07 7:05 
GeneralRe: Learning C# Pin
Christian Graus15-Feb-07 9:19
protectorChristian Graus15-Feb-07 9:19 
GeneralRe: Learning C# Pin
starcraft4ever15-Feb-07 11:04
starcraft4ever15-Feb-07 11:04 
Yep, but I really dislike to make a private member as public.

I like to call my member with mXXX which in that case If I do that then my object will expose a variable mXXX which looks pretty bad.

Ofcourse as you know having a wrapper property to expose a variable allows you to expand the code behavior in the future and then the interface won't need to be changed as for example raise an event when the variable gets changed.

C# has many things that allows you to save code, if could exist something as I mention before, later if it needs to be expanded then replace the property declaration with a property body, so the property signature won't change.

In fact the compiler could detect a property declaration and replace it for a public/internal variable at compilation time, that could optimize the code too as long the property doesn't have a body.

Same case for example with anonymous methods, they allow you to save code and calls, but many people think they are ugly, but anyway they are there.

GeneralRe: Learning C# Pin
Daniel Grunwald15-Feb-07 9:51
Daniel Grunwald15-Feb-07 9:51 
GeneralRe: Learning C# Pin
starcraft4ever14-Feb-07 21:30
starcraft4ever14-Feb-07 21:30 
GeneralRe: Learning C# Pin
Christian Graus14-Feb-07 22:01
protectorChristian Graus14-Feb-07 22:01 
GeneralWell said! Pin
RoswellNX14-Feb-07 23:33
RoswellNX14-Feb-07 23:33 
GeneralRe: Learning C# Pin
d2_grv15-Feb-07 0:39
d2_grv15-Feb-07 0:39 
GeneralRe: Learning C# Pin
benjymous14-Feb-07 21:25
benjymous14-Feb-07 21:25 
GeneralRe: Learning C# Pin
Pravarakhya14-Feb-07 22:02
Pravarakhya14-Feb-07 22:02 
GeneralRe: Learning C# Pin
Shorgov14-Feb-07 22:35
Shorgov14-Feb-07 22:35 
GeneralRe: Learning C# Pin
Pravarakhya14-Feb-07 22:40
Pravarakhya14-Feb-07 22:40 
GeneralRe: Learning C# Pin
Shorgov14-Feb-07 22:49
Shorgov14-Feb-07 22:49 
GeneralRe: Learning C# Pin
DavidNohejl14-Feb-07 23:22
DavidNohejl14-Feb-07 23:22 
GeneralRe: Learning C# Pin
Shorgov14-Feb-07 23:51
Shorgov14-Feb-07 23:51 
GeneralRe: Learning C# [modified] Pin
Eric Goedhart15-Feb-07 2:31
professionalEric Goedhart15-Feb-07 2:31 
GeneralRe: Learning C# Pin
Muammar©15-Feb-07 7:05
Muammar©15-Feb-07 7:05 
GeneralRe: Learning C# Pin
Daniel Grunwald15-Feb-07 9:52
Daniel Grunwald15-Feb-07 9:52 
GeneralRe: Learning C# Pin
Rudolf Jan16-Feb-07 1:16
Rudolf Jan16-Feb-07 1:16 
Questiondraw the shapes on top of the controls... Pin
sathishtl00714-Feb-07 19:33
sathishtl00714-Feb-07 19:33 

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.