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:

What is m-commerce?
Every Web page has a unique address called ____________

പ്രധാന ഇമെയിൽ സേവനദാതാക്കൾ താഴെ കൊടുത്തിരിക്കുന്നവയിൽ ഏതെല്ലാം ?

  1. Gmail
  2. Rediff Mail
  3. Yahoo
  4. Microsoft Outlook
  5. AOL
    What is E-mail Spoofing ?
    Cryptography is the study of information …….