Click here to Skip to main content
15,895,011 members
Home / Discussions / C#
   

C#

 
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 
Hi,

I would like to describe two way of declaring properties

(1)

public string Get_Set<br />
{<br />
   get<br />
     {<br />
      return get_set;<br />
     }<br />
   set<br />
    {<br />
     get_set=value;<br />
    }<br />
} 


(2)

public string Get_Set<br />
{<br />
   get<br />
     {<br />
      return get_set;<br />
     }<br />
   set<br />
    {<br />
     if(get_set!=value) <br />
        get_set=value;<br />
    }<br />
} 



I would like to clear few things in property declaration.

a) From the above two property declaration , which one is best while considering efficient resource utilization.

b) If the above given examples are not good enough , then which one is best way of declaring a property.

Comment with detailed description will be highly appreciable.

Sreejith Nair
[ My Articles ]
GeneralRe: Best Way Pin
Luis Alonso Ramos20-Aug-05 20:45
Luis Alonso Ramos20-Aug-05 20:45 
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 
GeneralMicrosoft.Win32.RegistryValueKind.Binary Pin
Sam 200620-Aug-05 19:25
Sam 200620-Aug-05 19:25 
GeneralRe: Microsoft.Win32.RegistryValueKind.Binary Pin
| Muhammad Waqas Butt |21-Aug-05 1:00
professional| Muhammad Waqas Butt |21-Aug-05 1:00 
GeneralRe: Microsoft.Win32.RegistryValueKind.Binary Pin
Sam 200621-Aug-05 10:54
Sam 200621-Aug-05 10:54 
Generalhide form Pin
Sam 200620-Aug-05 19:00
Sam 200620-Aug-05 19:00 
GeneralRe: hide form Pin
Member 220452220-Aug-05 19:29
Member 220452220-Aug-05 19:29 
GeneralRe: hide form Pin
Sam 200620-Aug-05 19:32
Sam 200620-Aug-05 19:32 
GeneralRe: hide form Pin
Sam 200620-Aug-05 19:44
Sam 200620-Aug-05 19:44 
GeneralRe: hide form Pin
Sam 200620-Aug-05 19:51
Sam 200620-Aug-05 19:51 
GeneralRe: hide form Pin
rmedo21-Aug-05 2:49
rmedo21-Aug-05 2:49 
GeneralHooking into time changes Pin
monrobot1320-Aug-05 15:09
monrobot1320-Aug-05 15:09 
GeneralDirectX for C# install bad Pin
Anonymous20-Aug-05 15:05
Anonymous20-Aug-05 15:05 
GeneralRe: DirectX for C# install bad Pin
Ista20-Aug-05 16:45
Ista20-Aug-05 16:45 
GeneralAdding a custom control to Visual Studio Pin
Joe Isenhour20-Aug-05 12:25
Joe Isenhour20-Aug-05 12:25 
GeneralRe: Adding a custom control to Visual Studio Pin
rudy.net20-Aug-05 15:25
rudy.net20-Aug-05 15:25 

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.