.NET Application Development Flashcards
7 cards from real MCTS practice questions. Tap to flip, then mark Knew It or Still Learning โ missed cards come back until you master them.
Read the first 7 .NET Application Development flashcards as text
Which .NET class is used to serialize an object to XML format?
Answer: XmlSerializer
XmlSerializer converts objects to and from XML using public properties and fields.
What is the purpose of the 'using' statement in C# when working with unmanaged resources?
Answer: It ensures Dispose() is called when the block exits
The 'using' statement guarantees that Dispose() is called on IDisposable objects even if an exception occurs.
In ASP.NET, which HTTP module is responsible for Forms Authentication?
Answer: FormsAuthenticationModule
FormsAuthenticationModule intercepts requests and redirects unauthenticated users to the login page.
Which collection class in .NET provides O(1) lookup by key?
Answer: Dictionary
Dictionary uses a hash table internally, providing constant-time average lookups.
What does the 'sealed' keyword prevent in C#?
Answer: A class from being inherited
The sealed keyword prevents other classes from deriving from the marked class.
In .NET, what is the role of the Common Language Runtime (CLR)?
Answer: It manages execution, memory, and security for .NET applications
The CLR is the execution engine that handles memory management, JIT compilation, garbage collection, and security.
Which ADO.NET object is used to execute a stored procedure and retrieve a result set?
Answer: SqlCommand
SqlCommand executes SQL statements or stored procedures and can return results via ExecuteReader or ExecuteScalar.