Click here to Skip to main content
15,917,061 members
Home / Discussions / C#
   

C#

 
GeneralRe: WebRequest question Pin
zagzagzag21-Aug-05 8:10
zagzagzag21-Aug-05 8:10 
GeneralProject options in VS .NET Pin
Stylez Daviz21-Aug-05 4:48
Stylez Daviz21-Aug-05 4:48 
GeneralRe: Project options in VS .NET Pin
S Sansanwal21-Aug-05 16:10
S Sansanwal21-Aug-05 16:10 
GeneralCopy rows from one datatable to another Pin
Member 220452221-Aug-05 4:00
Member 220452221-Aug-05 4:00 
GeneralRe: Copy rows from one datatable to another Pin
pmasknguyen21-Aug-05 4:59
pmasknguyen21-Aug-05 4:59 
GeneralDataGrid Row Indicator Pin
econner21-Aug-05 3:43
econner21-Aug-05 3:43 
GeneralRe: DataGrid Row Indicator Pin
Sarvesvara (BVKS) Dasa21-Aug-05 16:42
Sarvesvara (BVKS) Dasa21-Aug-05 16:42 
GeneralDataGrid column sizing Pin
econner21-Aug-05 3:33
econner21-Aug-05 3:33 
GeneralRe: DataGrid column sizing Pin
Sarvesvara (BVKS) Dasa21-Aug-05 16:43
Sarvesvara (BVKS) Dasa21-Aug-05 16:43 
GeneralError Logger Pin
rmedo21-Aug-05 2:55
rmedo21-Aug-05 2:55 
GeneralRe: Error Logger Pin
zagzagzag21-Aug-05 5:52
zagzagzag21-Aug-05 5:52 
GeneralRe: Error Logger Pin
DavidNohejl21-Aug-05 6:32
DavidNohejl21-Aug-05 6:32 
GeneralRe: Error Logger Pin
AETaylor21-Aug-05 8:03
AETaylor21-Aug-05 8:03 
GeneralBulk insert in Oracle Pin
mohitTheOne21-Aug-05 2:14
mohitTheOne21-Aug-05 2:14 
GeneralSending Mail thru MS OUTLOOK Pin
Sarvesvara (BVKS) Dasa21-Aug-05 1:57
Sarvesvara (BVKS) Dasa21-Aug-05 1:57 
GeneralRe: Sending Mail thru MS OUTLOOK Pin
Guffa21-Aug-05 6:54
Guffa21-Aug-05 6:54 
Generalaudio problem Pin
snouto21-Aug-05 0:29
snouto21-Aug-05 0:29 
Questionhow to make a metronome? Pin
Maxwell01220-Aug-05 23:41
sussMaxwell01220-Aug-05 23:41 
AnswerRe: how to make a metronome? Pin
Guffa20-Aug-05 23:52
Guffa20-Aug-05 23:52 
GeneralRe: how to make a metronome? Pin
Maxwell01221-Aug-05 2:19
sussMaxwell01221-Aug-05 2:19 
GeneralProcess gives no output in stdout Pin
Guffa20-Aug-05 22:24
Guffa20-Aug-05 22:24 
GeneralBest Way Pin
sreejith ss nair20-Aug-05 20:18
sreejith ss nair20-Aug-05 20:18 
GeneralRe: Best Way Pin
Luis Alonso Ramos20-Aug-05 20:45
Luis Alonso Ramos20-Aug-05 20:45 
Hello,

For simplicity, if it's only setting a variable and not doing something else, I'd use the first case:
public string MyProperty
{
    get { return myProperty;  }
    set { myProperty = value; }
}
If setting the property implies other operations, then, depending on them, I would check the previous value. For example, if when a property is set to false I need to remove an event handler, I would check before that the property was not already false, so I don't remove the handler twice. But for simple properties that only set variables, no need to check.

-- LuisR



Luis Alonso Ramos
Intelectix - Chihuahua, Mexico

Not much here: My CP Blog!


The amount of sleep the average person needs is five more minutes. -- Vikram A Punathambekar, Aug. 11, 2005
GeneralLoading an Assembly without locking the file Pin
Member 220452220-Aug-05 19:26
Member 220452220-Aug-05 19:26 
GeneralRe: Loading an Assembly without locking the file Pin
mav.northwind20-Aug-05 20:35
mav.northwind20-Aug-05 20:35 

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.