PrepAway - Latest Free Exam Questions & Answers

Which access modifier should you use for the GetData() method?

An application includes a class named Person. The Person class includes a method named GetData.
You need to ensure that the GetData() method can beused only by the Person class or a class derived
from the Person class.
Which access modifier should you use for the GetData() method?

PrepAway - Latest Free Exam Questions & Answers

A.
Internal

B.
Protected

C.
Protected Internal

D.
Private

E.
Public

Explanation:
http://msdn.microsoft.com/en-us/library/ms173121.aspx

3 Comments on “Which access modifier should you use for the GetData() method?


Leave a Reply