Can nested classes use any of the 5 types of accessibility?

1 Answer

Answer :

Yes

Related questions

Description : Can you have nested namespaces? 

Last Answer : Yes

Description : What is a nested class?

Last Answer : A class declare within a class. 

Description : Define what is nested class?

Last Answer : Nested classes are classes within classes. A nested class is any class whose declaration occurs within the body of another class or interface.

Description : Briefly describe the five accessibility requirements of the Certified for Windows logo program.

Last Answer : The five requirements are o Support standard system settings. This requires your application to be able to conform to system settings for colors, fonts, and other UI elements. o Be ... information by sound alone. This requirement can be met by providing redundant means of conveying information.

Description : Why can’t you specify the accessibility modifier for methods inside the interface?

Last Answer : They all must be public, and are therefore public by default. 

Description : Describe the accessibility modifier “protected internal”. 

Last Answer : It is available to classes that are within the same assembly and derived from the specified base class.

Description : What is the default accessibility for members of a struct? 

Last Answer : private

Description : What is the default accessibility for members of an interface?

Last Answer : public

Description : What is the default accessibility for a class?

Last Answer : internal for a top level class, private for a nested one. 

Description : What is private accessibility?

Last Answer : Access is restricted to within the containing class. 

Description : What is protected internal accessibility?

Last Answer : Access is restricted to types derived from the containing class or from files within the same assembly.

Description : What is internal accessibility?

Last Answer : A member marked internal is only accessible from files within the same assembly.

Description : What is protected accessibility? 

Last Answer : Access is restricted to types derived from the containing class. 

Description : What is public accessibility?

Last Answer : There are no access restrictions. 

Description : Why can’t you specify the accessibility modifier for methods inside the interface?

Last Answer : They all must be public, and are therefore public by default.

Description : Describe the accessibility modifier “protected internal”. 

Last Answer : It is available to classes that are within the same assembly and derived from the specified base class.

Description : Why can’t you specify the accessibility modifier for methods inside the interface? 

Last Answer : They all must be public. Therefore, to prevent you from getting the false impression that you have any freedom of choice, you are not allowed to specify any accessibility, it’s public by default.

Description : Describe the accessibility modifier protected internal. 

Last Answer : It’s available to derived classes and classes within the same Assembly (and naturally from the base class it’s declared in). 

Description : It is possible to define a class within a class termed as nested class. There are ............ types of nested classes. (A) 2 (B) 3 (C) 4 (D) 5

Last Answer : Answer: A, C

Description : Inner classes are A) anonymous classes B) nested classes C) sub classe

Last Answer : B) nested classes

Description : What are advantages and disadvantages of Microsoft-provided data provider classes in ADO.NET?

Last Answer : SQLServer.NET data provider is high-speed and robust, but requires SQL Server license purchased from Microsoft. OLE-DB.NET is universal for accessing other sources, like Oracle, DB2, Microsoft Access and Informix. ... on top of the OLE layer, so it's not as fastest and efficient as SqlServer.NET.

Description : What’s the difference between System.String and System.Text.StringBuilder classes?

Last Answer : System.String is immutable. System.StringBuilder was designed with the purpose of having a mutable string where a variety of operations can be performed.

Description : All classes derive from what? 

Last Answer : System.Object 

Description : What are advantages and disadvantages of Microsoft-provided data provider classes in ADO.NET?

Last Answer : SQLServer.NET data provider is high-speed and robust, but requires SQL Server license purchased from Microsoft. OLE-DB.NET is universal for accessing other sources, like Oracle, DB2, Microsoft Access and Informix. ... on top of the OLE layer, so it's not as fastest and efficient as SqlServer.NET.

Description : What’s the difference between System.String and System.Text.StringBuilder classes?

Last Answer : System.String is immutable. System.StringBuilder was designed with the purpose of having a mutable string where a variety of operations can be performed.

Description : What’s the difference between System.String and System.StringBuilder classes?

Last Answer : System.String is immutable, System.StringBuilder was designed with the purpose of having a mutable string where a variety of operations can be performed.

Description : Can you prevent your class from being inherited and becoming a base class for some other classes?

Last Answer : Yes, that’s what keyword sealed in the class definition is for. The developer trying to derive from your class will get a message: cannot inherit from Sealed class WhateverBaseClassName. It’s the same concept as final class in Java.

Description : Define what are sealed classes in c#?

Last Answer : The sealed modifier is used to prevent derivation from a class. A compile-time error occurs if a sealed class is specified as the base class of another class.

Description : Define what are sealed classes in C#?

Last Answer : The sealed modifier is used to prevent derivation from a class. A compile-time error occurs if a sealed class is specified as the base class of another class.

Description : Describe 5 numeric value types ranges. 

Last Answer : sbyte -128 to 127, byte 0 – 255, short -32,768 to 32,767, int -2,147,483,648 to 2,147,483,647, ulong 0 to 18,446,744,073,709,551,615 

Description : Name 5 built in types. 

Last Answer : Bool, char, int, byte, double

Description : Briefly describe the three types of user-developed controls and how they differ.

Last Answer : The three types of user-developed controls are inherited controls, user controls, and custom controls. An inherited control derives from a standard Windows Forms control and inherits the ... inherit only generic control functionality. All specific functionality must be implemented by the developer.

Description : Briefly explain the difference between Public (public), Friend (internal), and Private (private) access levels as they apply to user-defined types and members.

Last Answer : In user-defined types, Public (public) classes can be instantiated by any element of the application. Friend (internal) classes can be instantiated only by members of the same assembly, and Private ( ... the same assembly, and Private (private) members can be accessed only from within the type. 

Description : Briefly describe what members are, and list the four types of members.

Last Answer : Members are the parts of a class or a structure that hold data or implement functionality. The primary member types are fields, properties, methods, and events.

Description : Can you store multiple data types in System.Array?

Last Answer : No. 

Description : Can you store multiple data types in System.Array?

Last Answer : No.

Description : Are value types are slower to pass as method parameters? 

Last Answer : Yes

Description : What are the names of the three types of operators? 

Last Answer : Unary, binary, and conversion. 

Description : What are the two return types for main? 

Last Answer : void and int

Description : Can you store multiple data types in System.Array?

Last Answer : No.

Description : Define what are the different types of polymorphism?

Last Answer : There are two types of polymorphism. They are: Compile time Polymorphism Run time Polymorphism

Description : Define what are the different types of literals in C#?

Last Answer : Boolean literals: True and False are literals of the Boolean type that map to the true and false state, respectively. Integer literals: Used to write values of types Int, uint, long, and ulong. Real ... by a double-quote character, such as © hello . The Null literal: Represents the null-type.

Description : Define what are the different types of variables in C#?

Last Answer : Different types of variables used in C# are : static variables instance variable value parameters reference parameters array elements output parameters local variables

Description : Define what are the types of errors?

Last Answer : Syntax error Logic error Runtime error

Description : Define what is literals and their types?

Last Answer : Literals are value constants assigned to variables in a program. C# supports several types of literals are Integer Literals Real literals Boolean Literals Single character literals String Literals Backslash character literals

Description : Define what are the different types of Caching?

Last Answer : There are three types of Caching: 1. Output Caching: stores the responses from an asp.net page. 2. Fragment Caching: Only caches/stores the portion of the page (User Control) 3. Data Caching: is Programmatic way to Cache objects for performance.

Description : Define what are the two data types available in C#?

Last Answer : Value type Reference type

Description : Define what are value types and reference types?

Last Answer : Value types are stored in the Stack. Examples: bool, byte, chat, decimal, double, enum, float, int, long, byte, short, strut, uint, ulong, short. Reference types are stored in the Heap. Examples: class, delegate, interface, object, string.

Description : Define what are the different types of statements supported in C#?

Last Answer : C# supports several different kinds of statements are Block statements Declaration statements Expression statements Selection statements Iteration statements Jump statements Try catch statements Checked and unchecked Lock statement

Description : Define what are reference types in C#?

Last Answer : Below is the list of reference types in C# – 1. class 2. string 3. interface 4. object