Microsoft Certified Solutions Developer (MCSD) — Questions and Answers
Question 1: What does the `virtual` keyword allow in C#?
- Makes a method thread-safe
- Prevents method overriding
- Creates an abstract method
- Allows a method to be overridden in derived classes (Correct answer)
Correct answer: Allows a method to be overridden in derived classes
The `virtual` keyword marks a method so that derived classes can override it using the `override` keyword.
Question 2: To construct an application, you utilize Microsoft Visual Studio 2010 and Microsoft.NET Framework 4. The ADO.NET Entity Framework is used by the application to maintain customer and associated order records. You add a fresh order for a current client. The Order entity and the Customer entity must be linked. What ought you to do?
- Use the Attach method of the ObjectContext to add both Order and Customer entities
- Use the AddObject method of the ObjectContext to add both Order and Customer entities
- Call the Add method on the EntityCollection of the Order entity
- Set the Value property of the EntityReference of the Order entity (Correct answer)
Correct answer: Set the Value property of the EntityReference of the Order entity
Set the Entity's Value property. An entity reference for the Order.
Question 3: What does the `@model` directive do in a Razor view?
- Specifies the type of the model passed to the view (Correct answer)
- Imports a namespace
- Defines a layout page
- Declares a partial view
Correct answer: Specifies the type of the model passed to the view
The `@model` directive declares the type of the strongly-typed model that the view expects.
Question 4: What does the `?? ` (null coalescing) operator do in C#?
- Checks if two values are equal
- Returns the left operand if not null, otherwise returns the right operand (Correct answer)
- Throws an exception if null
- Casts a value to a nullable type
Correct answer: Returns the left operand if not null, otherwise returns the right operand
The `??` operator returns the left-hand operand if it is not null; otherwise, it returns the right-hand operand.
Question 5: Which attribute in ASP.NET Web API enables CORS for a specific controller?
- [EnableCors] (Correct answer)
- [CrossOrigin]
- [PermitOrigin]
- [AllowCors]
Correct answer: [EnableCors]
The `[EnableCors]` attribute in ASP.NET Web API enables CORS for a controller or action with specified origins.
Question 6: Which interface must a class implement to use it in a `foreach` loop in C#?
- IEnumerable (Correct answer)
- IComparable
- IList
- ICollection
Correct answer: IEnumerable
A class must implement `IEnumerable` (or `IEnumerable<T>`) to support `foreach` iteration.
Question 7: Which method on the Fetch API is used to parse a JSON response body?
- response.parse()
- response.text()
- response.json() (Correct answer)
- response.data()
Correct answer: response.json()
`response.json()` reads the Response body and returns a Promise that resolves to the result of parsing it as JSON.
Question 8: What is the default value of a bool field in a C# class?
- true
- 0
- false (Correct answer)
- null
Correct answer: false
Uninitialized bool fields in C# default to `false`.
Question 9: What is the correct way to create a Promise that immediately resolves with the value 42?
- Promise.reject(42)
- Promise.done(42)
- async Promise(42)
- new Promise(resolve => resolve(42)) (Correct answer)
Correct answer: new Promise(resolve => resolve(42))
`new Promise(resolve => resolve(42))` creates a Promise and immediately calls `resolve`, settling it with the value 42.
Question 10: Which programming language is NOT supported for developing Windows Store apps?
- VB.NET
- C#
- PHP (Correct answer)
- C++
Correct answer: PHP
Windows Store apps support C#, VB.NET, C++, and JavaScript/HTML, but not PHP.
Question 11: Which HTML5 element is best suited for representing a self-contained piece of content like a blog post?
- <section>
- <div>
- <aside>
- <article> (Correct answer)
Correct answer: <article>
The `<article>` element is intended for self-contained content that could be distributed independently, such as a blog post or news story.
Question 12: In CSS3, what does the `box-sizing: border-box` declaration affect?
- It forces the element to display as a block
- It removes the default margin of an element
- It makes padding and border included in the element's total width and height (Correct answer)
- It adds a visible border around an element
Correct answer: It makes padding and border included in the element's total width and height
With `border-box`, padding and border are included in the specified width and height, making layout calculations more predictable.
Question 13: Which C# feature allows a method to accept a variable number of parameters?
- optional
- ref
- out
- params (Correct answer)
Correct answer: params
The `params` keyword allows a method to accept a variable number of arguments as an array.
Question 14: Which API is used to send toast notifications in Windows Store apps?
- MessageDialog
- PushNotificationChannel
- NotificationService
- ToastNotificationManager (Correct answer)
Correct answer: ToastNotificationManager
`ToastNotificationManager` is the WinRT class used to create and display toast pop-up notifications.
Question 15: What is the Model-View-ViewModel (MVVM) pattern's primary benefit in Windows Store app development?
- Separating UI logic from business logic to improve testability (Correct answer)
- Enabling direct hardware access
- Faster app certification
- Reducing app manifest size
Correct answer: Separating UI logic from business logic to improve testability
MVVM separates UI (View) from business logic (ViewModel/Model), enabling unit testing and cleaner code.
Question 16: In Azure, which storage type is best suited for storing large amounts of unstructured binary data like images and videos?
- Azure Table Storage
- Azure File Storage
- Azure Queue Storage
- Azure Blob Storage (Correct answer)
Correct answer: Azure Blob Storage
Azure Blob Storage is optimized for storing massive amounts of unstructured data such as text and binary files.
Question 17: What does the Windows Store app sandbox model restrict?
- Using the XAML framework
- Direct access to system resources without declared capabilities (Correct answer)
- Rendering graphics
- Displaying notifications
Correct answer: Direct access to system resources without declared capabilities
The sandbox model restricts apps from accessing system resources (files, cameras, etc.) unless declared in the app manifest.
Question 18: Which WCF binding is optimized for cross-machine communication over HTTP and interoperability with non-.NET clients?
- BasicHttpBinding (Correct answer)
- NetTcpBinding
- NetNamedPipeBinding
- WSDualHttpBinding
Correct answer: BasicHttpBinding
BasicHttpBinding uses SOAP 1.1 over HTTP, making it the most interoperable binding for non-.NET clients.
Question 19: You are styling a box object on a page by using CSS3. <br> You need to set the transparency of the object to 50%. <br> Which two CSS3 styles will achieve the goal? (Each correct answer presents a complete solution. Choose two.)
- Option B (Correct answer)
- Option C (Correct answer)
- Option D
- Option A
Correct answer: Option B
The RGBA declaration allows you to set opacity (via the Alpha channel) as part of the color value.
Question 20: What does the HTML5 `placeholder` attribute do?
- Displays hint text inside an input field when empty (Correct answer)
- Sets the default value submitted with the form
- Validates the input against a pattern
- Locks the field from user input
Correct answer: Displays hint text inside an input field when empty
The `placeholder` attribute shows ghost text inside a form field that disappears once the user starts typing.
Question 21: What does the `async` keyword do when applied to a method in C#?
- Marks the method as asynchronous, allowing use of await (Correct answer)
- Makes the method static
- Compiles the method ahead-of-time
- Runs the method on a new thread
Correct answer: Marks the method as asynchronous, allowing use of await
The `async` modifier marks a method as asynchronous, enabling the `await` keyword within it.
Question 22: What is the purpose of the `async`/`await` pattern in Windows Store apps?
- To deploy the app to the Store
- To keep the UI responsive while waiting for long operations to complete (Correct answer)
- To enable multithreading
- To encrypt network calls
Correct answer: To keep the UI responsive while waiting for long operations to complete
Using `async`/`await` in Windows Store apps prevents the UI thread from blocking during I/O or network operations.
Question 23: In Entity Framework, which method is called to persist tracked changes to the database?
- SaveChanges() (Correct answer)
- Submit()
- Commit()
- Flush()
Correct answer: SaveChanges()
SaveChanges() writes all pending inserts, updates, and deletes tracked by the DbContext to the database.
Question 24: What is the WinRT API in the context of Windows Store apps?
- A graphics rendering engine
- A testing framework
- The Windows Runtime API providing access to OS features for Store apps (Correct answer)
- A web framework for Windows
Correct answer: The Windows Runtime API providing access to OS features for Store apps
WinRT (Windows Runtime) is the core API for Windows Store apps, providing access to OS capabilities like sensors and notifications.
Question 25: What is the purpose of the `abstract` keyword when applied to a class in C#?
- Seals the class hierarchy
- Prevents instantiation and requires derived classes to implement abstract members (Correct answer)
- Makes all methods private
- Allows multiple inheritance
Correct answer: Prevents instantiation and requires derived classes to implement abstract members
An abstract class cannot be instantiated directly and may contain abstract members that subclasses must implement.
Question 26: What does the `[Key]` data annotation do in Entity Framework Code-First?
- Encrypts the property value
- Makes the property required
- Sets a foreign key relationship
- Designates the property as the primary key of the entity (Correct answer)
Correct answer: Designates the property as the primary key of the entity
The `[Key]` attribute marks a property as the primary key, used when EF cannot infer it by convention.
Question 27: Which layout panel in XAML arranges children in a single row or column?
- WrapGrid
- Canvas
- Grid
- StackPanel (Correct answer)
Correct answer: StackPanel
`StackPanel` arranges its child elements in a single line, either horizontally or vertically.
Question 28: Which HTTP verb is idempotent and used to fully replace an existing resource?
- PATCH
- DELETE
- PUT (Correct answer)
- POST
Correct answer: PUT
PUT replaces the entire resource at the target URL and is idempotent — calling it multiple times produces the same result.
Question 29: Which CSS3 property is used to apply a smooth transition between two states of an element?
- transform
- animation
- keyframe
- transition (Correct answer)
Correct answer: transition
The CSS3 `transition` property specifies the duration and timing of property changes between states.
Question 30: Which statement correctly describes a C# delegate?
- A type-safe function pointer (Correct answer)
- A struct that holds event data
- A class that wraps an interface
- A static method that returns void
Correct answer: A type-safe function pointer
A delegate is a type-safe reference to a method, functioning as a first-class function pointer in C#.
Microsoft Certified Solutions Developer (MCSD)
The MCSD certification validates expertise in building modern applications using Microsoft technologies, covering HTML5/JavaScript, C#, Windows Store development, and data access. Candidates complete a path of related exams under the MCSD: App Builder or MCSD: Windows Store Apps track, each requiring a scaled passing score of 700/1000.
Exam Rules
- You can skip questions and return to them later
- Flag questions for review before submitting
- No feedback shown until you submit the entire exam
- Unanswered questions count as wrong — answer everything
- 10 pretest questions are mixed in and don't affect your score
- Timer auto-submits when time runs out
- Your progress is auto-saved every 30 seconds