Which of the following are correct?

Properties in .NET can be declare as
1.Static , Protected internal,Virtual
2.Public,internal, Protected internal
3.Only public
4.None

Options
- 1,2
- 3
- 1,2,3
- 4


CORRECT ANSWER : 1,2

Discussion Board
C#.NET

The answer is correct. Properties can be marked as public, private, protected, internal, or protected internal. These access modifiers define how users of the class can access the property. A property may be marked as a virtual property by using the virtual keyword. This enables derived classes to override the property behavior by using the override keyword.

Prajakta Pandit 09-11-2015 04:48 AM

Discussion

I could not get the understanding of answer as 1 for this question. could you please explain. How could a property be declared as virtual.

Aadii 04-22-2014 08:58 AM

Write your comments


Enter the code shown above:

(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)


Advertisement