Click here to Skip to main content
16,006,493 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
GeneralFramework 2.0 Beta Pin
Paolopf5-Jun-05 22:19
Paolopf5-Jun-05 22:19 
GeneralRe: Framework 2.0 Beta Pin
S. Senthil Kumar6-Jun-05 0:45
S. Senthil Kumar6-Jun-05 0:45 
GeneralRe: Framework 2.0 Beta Pin
Paolopf6-Jun-05 2:06
Paolopf6-Jun-05 2:06 
GeneralRe: Framework 2.0 Beta Pin
MoustafaS6-Jun-05 2:46
MoustafaS6-Jun-05 2:46 
GeneralRe: Framework 2.0 Beta Pin
Paolopf6-Jun-05 20:00
Paolopf6-Jun-05 20:00 
GeneralFixed SEHException w/.NET EnableVisualStyles Pin
Matt Strum4-Jun-05 17:07
Matt Strum4-Jun-05 17:07 
Generaldoubt reg usage of 'this' Pin
manivannan.p3-Jun-05 23:54
manivannan.p3-Jun-05 23:54 
GeneralRe: doubt reg usage of 'this' Pin
Colin Angus Mackay4-Jun-05 0:21
Colin Angus Mackay4-Jun-05 0:21 
manivannan.p wrote:
I want to know,if using 'this' to refer to the local variables inside a class is a good practice. using 'this' would be a bit costly or it would infact aid performance ?

A local variable is one which is within the scope of the method or property, not the class. I think what you mean is member variable (aka field in .NET)

Using the this keyword is just making explicit what the compiler will do implicitly anyway. There is no perfomance advantage to using it or not as the resulting code will be compiled to be the same anyway.

The only time where it does make a difference is where you have a local variable and a member variable with the same name. You must use the this keyword to refer to the member variable in that instance otherwise the compiler will assume you are referring to the local variable.

Does this help?


My: Blog | Photos
WDevs.com - Open Source Code Hosting, Blogs, FTP, Mail and More


GeneralTHANKS Colin Pin
manivannan.p4-Jun-05 3:16
manivannan.p4-Jun-05 3:16 
GeneralExport to excel data from ultrawebgrid each row contain one worksheet Pin
sunilmskr3-Jun-05 19:20
sunilmskr3-Jun-05 19:20 
Questionhow to bind the controls to the data source Pin
3-Jun-05 14:48
suss3-Jun-05 14:48 
Generaldll Pin
ziczaczoom20043-Jun-05 9:35
ziczaczoom20043-Jun-05 9:35 
GeneralRe: dll Pin
Kareem Shaker4-Jun-05 23:51
Kareem Shaker4-Jun-05 23:51 
GeneralRe: dll Pin
ziczaczoom200413-Jun-05 8:05
ziczaczoom200413-Jun-05 8:05 
QuestionAny commercial application written in .NET? Pin
Julien Delezenne2-Jun-05 12:38
Julien Delezenne2-Jun-05 12:38 
AnswerRe: Any commercial application written in .NET? Pin
Christian Graus2-Jun-05 12:43
protectorChristian Graus2-Jun-05 12:43 
GeneralRe: Any commercial application written in .NET? Pin
Julien Delezenne2-Jun-05 15:01
Julien Delezenne2-Jun-05 15:01 
GeneralRe: Any commercial application written in .NET? Pin
Christian Graus2-Jun-05 15:04
protectorChristian Graus2-Jun-05 15:04 
GeneralRe: Any commercial application written in .NET? Pin
DavidNohejl2-Jun-05 15:32
DavidNohejl2-Jun-05 15:32 
AnswerRe: Any commercial application written in .NET? Pin
Marc Clifton2-Jun-05 15:17
mvaMarc Clifton2-Jun-05 15:17 
AnswerRe: Any commercial application written in .NET? Pin
rwestgraham3-Jun-05 10:29
rwestgraham3-Jun-05 10:29 
AnswerRe: Any commercial application written in .NET? Pin
Kareem Shaker4-Jun-05 23:54
Kareem Shaker4-Jun-05 23:54 
GeneralRe: Any commercial application written in .NET? Pin
Anonymous6-Jun-05 6:02
Anonymous6-Jun-05 6:02 
GeneralRe: Any commercial application written in .NET? Pin
Kareem Shaker6-Jun-05 20:21
Kareem Shaker6-Jun-05 20:21 
GeneralRe: Any commercial application written in .NET? Pin
Kareem Shaker6-Jun-05 20:22
Kareem Shaker6-Jun-05 20:22 

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.