Click here to Skip to main content
15,894,720 members
Home / Discussions / C#
   

C#

 
GeneralRe: Custom Server Controls (Restrict Defaults) Pin
pmarfleet2-Aug-07 12:47
pmarfleet2-Aug-07 12:47 
GeneralRe: Custom Server Controls (Restrict Defaults) Pin
tranzformerz2-Aug-07 13:17
tranzformerz2-Aug-07 13:17 
QuestionInvisible countdown? Pin
jafingi2-Aug-07 9:39
jafingi2-Aug-07 9:39 
AnswerRe: Invisible countdown? Pin
Tarakeshwar Reddy2-Aug-07 9:48
professionalTarakeshwar Reddy2-Aug-07 9:48 
AnswerRe: Invisible countdown? Pin
Luc Pattyn2-Aug-07 9:59
sitebuilderLuc Pattyn2-Aug-07 9:59 
AnswerRe: Invisible countdown? Pin
Manoj Kumar Rai2-Aug-07 20:40
professionalManoj Kumar Rai2-Aug-07 20:40 
GeneralRe: Invisible countdown? Pin
jafingi3-Aug-07 1:36
jafingi3-Aug-07 1:36 
QuestionTo "this." or not to "this.", that is the question... Pin
Poolee2-Aug-07 9:20
Poolee2-Aug-07 9:20 
Hi there

I'm relatively new to C#, so please exuse me if this seems n00bish...

But, when referencing a control on a form is it good practice to include "this.", for example:

textBox1.Text = "Hello World";

-or-

this.textBox1.Text = "Hello World";


I ask this because I haven't seen any convention mentioned anywhere, or consistency. Does it even matter? Also, I note that within a contructor for a class, you might use the same variable name for a parsed variable as you would for the private local variable, eg:

public class fclsHelloWorld: Form
{
  private bool sayHelloWorld;

  public fclsHelloWorld ( bool args, bool sayHelloWorld )
  {
    InitializeComponent ();
    this.sayHelloWorld = sayHelloWorld;
  }
...
}


So, it's obviously needed to specify which variable you're referring to.

Thanks in advance Big Grin | :-D

Cheers
Poolee


... pessimists are rarely disappointed ...

AnswerRe: To "this." or not to "this.", that is the question... Pin
Luis Alonso Ramos2-Aug-07 9:31
Luis Alonso Ramos2-Aug-07 9:31 
AnswerRe: To "this." or not to "this.", that is the question... Pin
Pete O'Hanlon2-Aug-07 9:39
mvePete O'Hanlon2-Aug-07 9:39 
AnswerRe: To "this." or not to "this.", that is the question... Pin
Judah Gabriel Himango2-Aug-07 10:10
sponsorJudah Gabriel Himango2-Aug-07 10:10 
AnswerRe: To "this." or not to "this.", that is the question... Pin
Martin#2-Aug-07 10:22
Martin#2-Aug-07 10:22 
QuestionRe: To "this." or not to "this.", that is the question... Pin
Poolee3-Aug-07 10:29
Poolee3-Aug-07 10:29 
AnswerRe: To "this." or not to "this.", that is the question... Pin
Martin#6-Aug-07 19:59
Martin#6-Aug-07 19:59 
AnswerRe: To "this." or not to "this.", that is the question... Pin
Colin Angus Mackay2-Aug-07 11:52
Colin Angus Mackay2-Aug-07 11:52 
AnswerRe: To "this." or not to "this.", that is the question... Pin
V.2-Aug-07 20:27
professionalV.2-Aug-07 20:27 
GeneralRe: To "this." or not to "this.", that is the question... Pin
originSH2-Aug-07 21:56
originSH2-Aug-07 21:56 
GeneralRe: To "this." or not to "this.", that is the question... Pin
V.2-Aug-07 22:28
professionalV.2-Aug-07 22:28 
AnswerRe: To "this." or not to "this.", that is the question... [modified] Pin
Malcolm Smart2-Aug-07 21:06
Malcolm Smart2-Aug-07 21:06 
QuestionGrab path of most recent file in a directory Pin
newb2vb2-Aug-07 8:43
newb2vb2-Aug-07 8:43 
AnswerRe: Grab path of most recent file in a directory Pin
led mike2-Aug-07 9:21
led mike2-Aug-07 9:21 
GeneralRe: Grab path of most recent file in a directory Pin
Martin#2-Aug-07 9:34
Martin#2-Aug-07 9:34 
GeneralRe: Grab path of most recent file in a directory Pin
led mike2-Aug-07 9:59
led mike2-Aug-07 9:59 
GeneralRe: Grab path of most recent file in a directory Pin
Martin#2-Aug-07 10:01
Martin#2-Aug-07 10:01 
QuestionCircular Button Pin
emo00622-Aug-07 8:07
emo00622-Aug-07 8:07 

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.