Click here to Skip to main content
15,914,162 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: The Stupid! It Hurts! Pin
Sander Rossel4-Dec-14 22:08
professionalSander Rossel4-Dec-14 22:08 
GeneralRe: The Stupid! It Hurts! Pin
V.4-Dec-14 22:37
professionalV.4-Dec-14 22:37 
GeneralRe: The Stupid! It Hurts! Pin
Abhinav S4-Dec-14 23:48
Abhinav S4-Dec-14 23:48 
GeneralRe: The Stupid! It Hurts! Pin
0bx5-Dec-14 0:01
0bx5-Dec-14 0:01 
GeneralRe: The Stupid! It Hurts! Pin
Keith Barrow5-Dec-14 0:11
professionalKeith Barrow5-Dec-14 0:11 
GeneralRe: The Stupid! It Hurts! Pin
Keith Barrow5-Dec-14 0:15
professionalKeith Barrow5-Dec-14 0:15 
GeneralRe: The Stupid! It Hurts! Pin
Thornik5-Dec-14 0:30
Thornik5-Dec-14 0:30 
QuestionThis vs. that Pin
Sander Rossel4-Dec-14 11:07
professionalSander Rossel4-Dec-14 11:07 
I have a question about your preferred programming style.
Whenever I write code in C# I make extensive use of the 'this' keyword and I use class names when referencing statics.
So:
C#
this.SomeProperty = someValue;
this.SomeMethod();
ThisClass.SomeStaticMethod();
Instead of:
C#
SomeProperty = someValue;
SomeMethod();
SomeStaticMethod();
My reasoning behind this is that I can tell something is an instance method or a static method.
And to be completely honest it's also something I started doing in VB because VB has Modules and Modules don't make you specify the Module's name. So Me.SomeMethod() can be an instance method, a Shared/static method on the current class or a method in some Module!
Now there's a new guy at work and he really hates this style of programming because he thinks it's redundant.

I'm not asking for right or wrong (unless I'm the one who's right Poke tongue | ;-P ), but I want to know personal preferences.
My blog[^]
C#
public class SanderRossel : Lazy<Person>
{
   public void DoWork()
   {
      throw new NotSupportedException();
   }
}

AnswerRe: This vs. that Pin
Nish Nishant4-Dec-14 11:13
sitebuilderNish Nishant4-Dec-14 11:13 
GeneralRe: This vs. that Pin
PIEBALDconsult4-Dec-14 17:18
mvePIEBALDconsult4-Dec-14 17:18 
GeneralRe: This vs. that Pin
Nish Nishant5-Dec-14 8:41
sitebuilderNish Nishant5-Dec-14 8:41 
GeneralRe: This vs. that Pin
PIEBALDconsult5-Dec-14 9:24
mvePIEBALDconsult5-Dec-14 9:24 
GeneralRe: This vs. that Pin
Nish Nishant5-Dec-14 9:36
sitebuilderNish Nishant5-Dec-14 9:36 
GeneralRe: This vs. that Pin
Nish Nishant5-Dec-14 8:43
sitebuilderNish Nishant5-Dec-14 8:43 
AnswerRe: This vs. that Pin
Jeremy Falcon4-Dec-14 11:51
professionalJeremy Falcon4-Dec-14 11:51 
AnswerRe: This vs. that Pin
Mark_Wallace4-Dec-14 12:05
Mark_Wallace4-Dec-14 12:05 
AnswerRe: This vs. that Pin
R. Giskard Reventlov4-Dec-14 13:02
R. Giskard Reventlov4-Dec-14 13:02 
GeneralRe: This vs. that Pin
Keith Barrow4-Dec-14 21:23
professionalKeith Barrow4-Dec-14 21:23 
GeneralRe: This vs. that Pin
Agent__0074-Dec-14 21:37
professionalAgent__0074-Dec-14 21:37 
GeneralRe: This vs. that Pin
PIEBALDconsult4-Dec-14 13:03
mvePIEBALDconsult4-Dec-14 13:03 
AnswerRe: This vs. that Pin
_Maxxx_4-Dec-14 13:51
professional_Maxxx_4-Dec-14 13:51 
GeneralRe: This vs. that Pin
Slacker0074-Dec-14 23:12
professionalSlacker0074-Dec-14 23:12 
AnswerRe: This vs. that Pin
Super Lloyd4-Dec-14 15:38
Super Lloyd4-Dec-14 15:38 
AnswerRe: This vs. that Pin
Sanjay K. Gupta4-Dec-14 17:54
professionalSanjay K. Gupta4-Dec-14 17:54 
AnswerRe: This vs. that Pin
Nareesh14-Dec-14 18:09
Nareesh14-Dec-14 18:09 

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.