Challenger App

No.1 PSC Learning App

1M+ Downloads

Which of the following statement is/are NOT correct about the access modifier in Visual Basic .NET?


(i) Protected access modifier applies to class members only.

(ii) Public access modifier defines a type that is accessible only from within its own class or from a derived class.

A(i) and (ii) only

B(i) only

C(ii) only

DNone

Answer:

C. (ii) only

Read Explanation:

Access modifiers in Visual Basic .NET are keywords that specify how a programming element can be accessed or how it will behave in a program. Some examples of access modifiers in Visual Basic .NET include : 

  • Public
    This modifier specifies that a programming element can be accessed from anywhere in the same project, from other projects that reference the project, and from any assembly built from the project. 
  • Protected
    This modifier specifies that a programming element can only be accessed from within the same class, or from a class derived from that class. 
  • Private
    This modifier specifies that a programming element is limited to the containing type. 


The default access modifiers for type members in Visual Basic are: 

  • Fields and constants: Private 
  • Methods: Public 
  • Structures: Public



Related Questions:

Which application software is primarily used for email communication ?
ബ്ലോഗ് എന്ന പദം ആദ്യമായി ഉപയോഗിച്ചത് ആരാണ് ?
മൈക്രാബ്ലോഗിങ്ങിന് ഉദാഹരണമായി നല്കാവുന്നത് ഏത്?
FPI stands for :
ഇന്റർനെറ്റ് വ്യാപാരത്തിനുള്ള ഡിജിറ്റൽ കറൻസി അറിയപ്പെടുന്ന പേര് ?