Click here to Skip to main content
15,897,371 members
Home / Discussions / C#
   

C#

 
Questionneed help with this error Pin
john231318-Apr-09 12:10
john231318-Apr-09 12:10 
AnswerRe: need help with this error Pin
Colin Angus Mackay18-Apr-09 13:34
Colin Angus Mackay18-Apr-09 13:34 
QuestionNew to C#, please explain how this works... Pin
Vengeful Emus18-Apr-09 11:14
Vengeful Emus18-Apr-09 11:14 
AnswerRe: New to C#, please explain how this works... Pin
Ravi Bhavnani18-Apr-09 12:06
professionalRavi Bhavnani18-Apr-09 12:06 
AnswerRe: New to C#, please explain how this works... Pin
Jimmanuel18-Apr-09 12:11
Jimmanuel18-Apr-09 12:11 
QuestionRe: New to C#, please explain how this works... Pin
Vengeful Emus18-Apr-09 12:41
Vengeful Emus18-Apr-09 12:41 
AnswerRe: New to C#, please explain how this works... Pin
Jimmanuel18-Apr-09 13:10
Jimmanuel18-Apr-09 13:10 
AnswerRe: New to C#, please explain how this works... Pin
Naruki19-Apr-09 15:49
Naruki19-Apr-09 15:49 
"Form1" is the class name. "this" refers to a specific instance of that class, an actual object.

You must use the class name when referring to static variables of that form, and you must (or can) use the instance reference when referring to instance variables.

Trying to precede the class name with the instance reference (this.Form1) is not really meaningful, and more than a bit confusing.


The "this" keyword is optional mainly because people get tired of typing it, I think. But there are cases where it must be used. When you have a class-scope variable and a method local variable with the same name, the "this" keyword specifies the class-scope variable. Otherwise, the local-scope variable is used.

Codemonkeys don't do it at all. Too busy coding.

QuestionCreate multiple derived instance in property grid for a property Pin
robert aaza18-Apr-09 6:50
robert aaza18-Apr-09 6:50 
Questiondialpad Pin
Roland Szigeti18-Apr-09 6:25
Roland Szigeti18-Apr-09 6:25 
AnswerRe: dialpad Pin
N a v a n e e t h18-Apr-09 6:51
N a v a n e e t h18-Apr-09 6:51 
GeneralRe: dialpad Pin
Roland Szigeti18-Apr-09 8:08
Roland Szigeti18-Apr-09 8:08 
GeneralRe: dialpad Pin
dan!sh 18-Apr-09 8:11
professional dan!sh 18-Apr-09 8:11 
AnswerRe: dialpad Pin
Luc Pattyn18-Apr-09 8:16
sitebuilderLuc Pattyn18-Apr-09 8:16 
QuestionADO.Net question Pin
Rafone18-Apr-09 6:10
Rafone18-Apr-09 6:10 
AnswerRe: ADO.Net question Pin
Henry Minute18-Apr-09 7:21
Henry Minute18-Apr-09 7:21 
GeneralRe: ADO.Net question Pin
Rafone18-Apr-09 7:45
Rafone18-Apr-09 7:45 
GeneralRe: ADO.Net question Pin
Henry Minute18-Apr-09 7:55
Henry Minute18-Apr-09 7:55 
QuestionTwo title bars active at the same time [modified] Pin
stardust161118-Apr-09 4:58
stardust161118-Apr-09 4:58 
AnswerRe: Two title bars active at the same time Pin
Henry Minute18-Apr-09 7:24
Henry Minute18-Apr-09 7:24 
GeneralRe: Two title bars active at the same time Pin
stardust161118-Apr-09 9:00
stardust161118-Apr-09 9:00 
GeneralRe: Two title bars active at the same time Pin
Henry Minute18-Apr-09 10:12
Henry Minute18-Apr-09 10:12 
GeneralRe: Two title bars active at the same time Pin
stardust161118-Apr-09 10:56
stardust161118-Apr-09 10:56 
GeneralRe: Two title bars active at the same time Pin
Henry Minute18-Apr-09 11:07
Henry Minute18-Apr-09 11:07 
QuestionExtracting ID3 albumart with TagLib Sharp Pin
Jon Henry18-Apr-09 3:09
Jon Henry18-Apr-09 3: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.