Untitled Document
Untitled Document
A) MainForm()
B) Start()
C) static void Main()
D) Run()
A) ValueType
B) Object
C) System
D) Type
Answer: B) Object
Explanation: All types in .NET, including value types and reference types, derive from the
System.Object class.
A) int nullableInt;
B) nullable int i;
C) int? i;
D) Int i = null;
Answer: C) int? i;
Explanation: In C#, int? is the shorthand for Nullable<int>, allowing the variable to
hold null.
Answer: A) Dispose()
A) virtual
B) static
C) abstract
D) override
Answer: C) abstract
Explanation: abstract is used to declare a class that cannot be instantiated and may
contain abstract methods.
A) private
B) protected
C) internal
D) public
Answer: C) internal
Explanation: By default, classes have internal access, meaning they are accessible
only within the same assembly.
A) ExecuteScalar()
B) ExecuteReader()
C) ExecuteNonQuery()
D) ExecuteQuery()
Answer: B) ExecuteReader()
A) DataReader
B) SqlCommand
C) SqlConnection
D) DataSet
Answer: D) DataSet
Explanation: DataSet stores data in memory and supports disconnected data access.
A) To import namespaces
B) To define asynchronous code
C) To handle exceptions
D) To create generics