Follow Our FB Page << CircleMedia.in >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...


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

Why do we need abstract class?

0 Answers  


What do you mean by stack and heap in c#?

0 Answers  


Explain ACID rule of thumb for transactions.

1 Answers  


If all code is written in a try block and write a catch block with Exception type Exception .In that scenario will all the exceptions catched by that catch block? or any exceptions which will not be caught?

3 Answers   Honeywell,


What is difference between Trace and Debug

0 Answers   BirlaSoft,






class Program { void add() { int x=10, y=20; fun(); Console.WriteLine("{0}", sum); } void fun() { int sum; sum = x + y; } static void Main(string[] args) { Program f =new Program(); f.add(); } } Debug above program.....

3 Answers   HCL,


What is thread life cycle in c#?

0 Answers  


if we are updating a database using thread, and mean while application crashes or thread being aborted then what will happen in Database? Rollback or Database will be updated? Please explain with different scenario.

0 Answers  


If I have more than one version of one assemblies, then how'll I use old version (how/where to specify version number?)in my application?

0 Answers  


Are c# strings immutable?

0 Answers  


How will you get the different language strings?

0 Answers  


What will a loop recorder show?

0 Answers  






Categories