Question Set

1. An enum that is declared inside a class, struct, namespace or interface is treated as public.



Ask Your Doubts Here

Type in
(Press Ctrl+g to toggle between English and the chosen language)

Comments

Show Similar Question And Answers
QA->Average height of 10 students in a class is 150 cm. A boy of height 160 cm left the class and a boy of height 148 cm is admitted. Then what is the average height of the students in the class now?....
QA->There are 50 students in a class. In a class test 22 students get 25 marks each, 18 students get 30 marks each. Each of the remaining gets 16 marks. The average mark of the whole class is :....
QA->he average weight of 16 boys in a class is 25 kg and that of the remaining 8 boys is 15 kg. Find the average weights of all the boys in the class.....
QA->In a class of 30 children 40% are girls. How many more girls coming to this class would make them 50%?....
QA->In a class of 60 students 55% are boys. The number of girls in the class is :....
MCQ->Which of the following statements are correct about an enum used inC#.NET? To use the keyword enum, we should either use [enum] or System.Enum. enum is a keyword. Enum is class declared in System.Type namespace. Enum is a class declared in the current project's root namespace. Enum is a class declared in System namespace.....
MCQ->Which of the following statements are correct about an enum used in C#.NET? An enum can be declared inside a class. An enum can take Single, Double or Decimal values. An enum can be declared outside a class. An enum can be declared inside/outside a namespace. An object can be assigned to an enum variable.....
MCQ->Which of the following statements are correct about the C#.NET code snippet given below? namespace IndiabixConsoleApplication ( class Sample { private enum color : int { red, green, blue } public void fun() { Console.WriteLine(color.red); } } class Program { static void Main(string[ ] args) { // Use enum color here } } } To define a variable of type enum color in Main(), we should use the statement, color c; . enum color being private it cannot be used in Main(). We must declare enum color as public to be able to use it outside the class Sample. To define a variable of type enum color in Main(), we should use the statement, Sample.color c; . We must declare private enum color outside the class to be able to use it in Main().....
MCQ->Which of the following statements are correct about a namespace used in C#.NET? Classes must belong to a namespace, whereas structures need not. Every class, struct, enum, delegate and interlace has to belong to some or the other namespace. All elements of the namespace have to belong to one file. If not mentioned, a namespace takes the name of the current project. The namespace should be imported to be able to use the elements in it.....
MCQ->Which of the following statements are correct about the C#.NET code snippet given below? namespace IndiabixConsoleApplication { class index { protected int count; public index() { count = 0; } } class index1: index { public void increment() { count = count +1; } } class MyProgram { static void Main(string[] args) { index1 i = new index1(); i.increment(); } } } count should be declared as public if it is to become available in the inheritance chain. count should be declared as protected if it is to become available in the inheritance chain. While constructing an object referred to by i firstly constructor of index class will be called followed by constructor of index1 class. Constructor of index class does not get inherited in index1 class. count should be declared as Friend if it is to become available in the inheritance chain.....
Terms And Service:We do not guarantee the accuracy of available data ..We Provide Information On Public Data.. Please consult an expert before using this data for commercial or personal use | Powered By:Omega Web Solutions
© 2002-2017 Omega Education PVT LTD...Privacy | Terms And Conditions
Question ANSWER With Solution