Click here to Skip to main content
15,892,674 members
Home / Discussions / C#
   

C#

 
GeneralQuestion about SqlClientPermission - SecurityException Pin
yboc13-Aug-03 20:06
yboc13-Aug-03 20:06 
GeneralRe: Question about SqlClientPermission - SecurityException Pin
TigerNinja_29-Aug-03 20:23
TigerNinja_29-Aug-03 20:23 
GeneralRe: Question about SqlClientPermission - SecurityException Pin
Anonymous16-Sep-03 15:50
Anonymous16-Sep-03 15:50 
GeneralWindows Tab Loopong Question C# Pin
mamaflynny13-Aug-03 19:58
mamaflynny13-Aug-03 19:58 
GeneralRe: Windows Tab Loopong Question C# Pin
Frank Olorin Rizzi14-Aug-03 6:18
Frank Olorin Rizzi14-Aug-03 6:18 
GeneralXML parsing Pin
devvvy13-Aug-03 18:17
devvvy13-Aug-03 18:17 
GeneralRe: XML parsing Pin
Manster14-Aug-03 5:26
Manster14-Aug-03 5:26 
GeneralRe: XML parsing Pin
devvvy14-Aug-03 5:28
devvvy14-Aug-03 5:28 
GeneralC++ #Define equivalent in C# Pin
Scottk (TKS)13-Aug-03 17:42
Scottk (TKS)13-Aug-03 17:42 
GeneralRe: C++ #Define equivalent in C# Pin
Arjan Einbu13-Aug-03 21:30
Arjan Einbu13-Aug-03 21:30 
GeneralRe: C++ #Define equivalent in C# Pin
Ista14-Aug-03 4:12
Ista14-Aug-03 4:12 
GeneralWorking with Multiple Winforms ComboBox Drop Down Lists C# Pin
mamaflynny13-Aug-03 17:23
mamaflynny13-Aug-03 17:23 
GeneralRe: Working with Multiple Winforms ComboBox Drop Down Lists C# Pin
Ista14-Aug-03 6:49
Ista14-Aug-03 6:49 
Questiona better way? Pin
Member 50926213-Aug-03 17:07
Member 50926213-Aug-03 17:07 
AnswerRe: a better way? Pin
Burt Harris16-Aug-03 17:15
Burt Harris16-Aug-03 17:15 
GeneralRe: a better way? Pin
Member 50926216-Aug-03 22:59
Member 50926216-Aug-03 22:59 
GeneralRe: a better way? Pin
Burt Harris31-Aug-03 11:02
Burt Harris31-Aug-03 11:02 
GeneralCoding Styles for Properties Pin
Alvaro Mendez13-Aug-03 16:08
Alvaro Mendez13-Aug-03 16:08 
I've been looking at a lot of C# code lately and have noticed that many people write property getters and setters inline, like this:

String Name
{
  get { return m_name; }
  set { m_name = value; }
}

I've always like to put curly braces on lines by themselves, but I find this style appealing. The problem is when a getter or setter is more than one line long. Then I end up with something like this:

String Name
{
  get { return m_name; }
  set 
  { 
    if (m_name == value)
      return;
 
    m_name = value;
    UpdateSomething();
  }    
}

So the get is inline but the set is not. I'm not too thrilled about this inconsistency and would like some opinions on the matter.

How do you do it?

Thanks,
Alvaro


If you want to get to the top, prepare to kiss a lot of bottom. -- despair.com
GeneralRe: Coding Styles for Properties Pin
Nick Seng13-Aug-03 16:40
Nick Seng13-Aug-03 16:40 
GeneralRe: Coding Styles for Properties Pin
James T. Johnson13-Aug-03 17:30
James T. Johnson13-Aug-03 17:30 
GeneralRe: Coding Styles for Properties Pin
Arjan Einbu13-Aug-03 21:48
Arjan Einbu13-Aug-03 21:48 
GeneralRe: Coding Styles for Properties Pin
Frank Olorin Rizzi14-Aug-03 6:23
Frank Olorin Rizzi14-Aug-03 6:23 
GeneralRe: Coding Styles for Properties Pin
leppie14-Aug-03 7:07
leppie14-Aug-03 7:07 
GeneralRe: Coding Styles for Properties Pin
James T. Johnson14-Aug-03 7:16
James T. Johnson14-Aug-03 7:16 
GeneralRe: Coding Styles for Properties Pin
Frank Olorin Rizzi14-Aug-03 7:24
Frank Olorin Rizzi14-Aug-03 7:24 

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.