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:

In Internet the files are transferred using the protocol:
Software, such as Explorer and Firefox, are referred to as
The designers of the internet protocol defined an IP address as a……..
E-mail that appears to have been originated from one source when it was actually sent from another source is referred to as :
SSL എന്നതിന്റെ പൂർണ്ണരൂപം?