WorksheetsC#_03/12/2021
Total questions: 5
Worksheet time: 3mins
QuocHN1: Which of the following statements is true about an enum used in C#.NET?
An implicit cast is needed to convert from enum type to an integral type.
An enum variable cannot have a public access modifier.
An enum variable cannot have a private access modifier.
An enum variable can be defined inside a class or a namespace.
QuocHN1: Which of the following is the correct output for the C#.NET code snippet given below?
enum color { red, green, blue }
color c;
c = color.red;
Console.WriteLine(c);
1
-1
red
0
QuocHN1: In which of the following collections is the Input/Output index-based?
Stack
ArrayList
HashTable
Queue
QuocHN1: A function returns a value, whereas a subroutine cannot return a value. ?
True
False
QuocHN1: Which of the following is NOT a namespace in the .NET Framework Class Library?
System.Process
System.Security
System.Threading
System.Drawing
