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

Can you inherit from multiple classes in c#?

1 Answers  


What?s class SortedList underneath?

1 Answers  


How does it work?

1 Answers  


Does a class need a constructor c#?

1 Answers  


Why do we use ienumerable in c#?

1 Answers  


Is string a primitive data type in c#?

1 Answers  


What is difference between variable and property in c#?

1 Answers  


Write a functin to add two no. Both no can be int, float.

3 Answers   HCL,


hi In my database i put id column as identity(the database is incremented by it self only)what i want is if i enter a data in my website, id will come automatically can u pl z tell me the code thax in advance

1 Answers  


How many types of constructors are there?

1 Answers  


What is the use of dll file in c#?

1 Answers  


Explain about Destructor method?

1 Answers  


Categories