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

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is trim in c#?

531


What is garbage collector and where should you use in .NET?

508


Why is static constructor called first?

474


Why is it called c sharp?

502


How do partial classes work in c#?

472






how to Create a datagridview control with check box column with 8rows in it, the maximum number of check boxes checked should be 3, when user checks the 4th corresponding message should be displayed and check box should be checked. User can uncheck the checked boxes Note: read-only property should not be used

2383


Can class be protected in c#?

509


What are c# attributes and its significance?

511


What's the difference between a method and a procedure?

471


What is delegates and events?

464


What is a constructor in c#?

507


Can you instantiate a struct without using a new operator in c#?

523


What is the difference between abstract class and interface in c#?

478


What is c# used for in the industry?

478


Define a jagged array in c#?

471