can we declare a variable by name "this" in a class? Please
explain?

Answers were Sorted based on User's Feedback



can we declare a variable by name "this" in a class? Please explain?..

Answer / bindu sharma

No,we cannot declare a variable by name "this" because it
is a keyword.but we can use any keyword as identifiers only
when they are prefaced by the @character.

Is This Answer Correct ?    29 Yes 1 No

can we declare a variable by name "this" in a class? Please explain?..

Answer / rajat

No you cannot

Is This Answer Correct ?    13 Yes 0 No

can we declare a variable by name "this" in a class? Please explain?..

Answer / murugavel

No we can't. Because its a keyword.

Is This Answer Correct ?    7 Yes 1 No

Post New Answer

More C Sharp Interview Questions

What is a console in c#?

0 Answers  


Are private class-level variables inherited?

5 Answers   HCL, Siebel Systems, Visual Soft,


What is autopostback in c#?

0 Answers  


What is void method?

0 Answers  


Why to use “using” in c#?

0 Answers  






What?s an interface class?

4 Answers  


what is difference between is and as operators in c#?

0 Answers   Winsol Solutions,


What is HashTable, what is the use of it, when do we use (purpose).

2 Answers  


What is static classes?

0 Answers  


What is the purpose of a console table?

0 Answers  


In c#, what will happen if you do not explicitly provide a constructor for a class?

0 Answers  


Difference between ByVal and ByRef?

5 Answers   Microsoft,


Categories