Microsoft Certified Solutions Developer (MCSD) — Questions and Answers
Question 1: Which WCF security mode encrypts messages using WS-Security standards regardless of the transport used?
- Message (Correct answer)
- None
- TransportWithMessageCredential
- Transport
Correct answer: Message
Message security mode applies encryption and signing at the SOAP message level using WS-Security, providing end-to-end security independent of the transport.
Question 2: In Entity Framework Code First, what attribute specifies that a property is the primary key of the entity?
- [ForeignKey]
- [Index]
- [Key] (Correct answer)
- [Required]
Correct answer: [Key]
The [Key] attribute designates a property as the primary key of the entity in Entity Framework Code First conventions.
Question 3: 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 D
- Option A
- Option C (Correct answer)
Correct answer: Option B
The RGBA declaration allows you to set opacity (via the Alpha channel) as part of the color value.
Question 4: In HTML5, which element is used to group a set of `<option>` elements within a `<select>` dropdown?
- <optgroup> (Correct answer)
- <fieldset>
- <group>
- <datalist>
Correct answer: <optgroup>
`<optgroup>` groups related options inside a `<select>` element with an optional label, improving dropdown readability.
Question 5: In HTML5, which input type would you use to allow the user to pick a color?
- type='picker'
- type='rgb'
- type='palette'
- type='color' (Correct answer)
Correct answer: type='color'
The `<input type='color'>` element provides a color picker control in supporting browsers.
Question 6: You are developing an HTML5 page. The page includes the following code. <br> The inner paragraph must be exactly 15 pixels from the top left corner of the outer paragraph. You set the left style for the inner paragraph to the appropriate value. <br> You need to set the position property of the inner paragraph. <br> <br> Which value should you use?
- Relative
- Fixed
- Static
- Absolute (Correct answer)
Correct answer: Absolute
Absolute: The element is positioned relative to its first positioned (not static) ancestor element.
Question 7: What does the `?? ` (null coalescing) operator do in C#?
- 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
- Checks if two values are equal
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 8: What does LINQ stand for in C#?
- List Integration Queue
- Language Integrated Query (Correct answer)
- Linked Input Query
- Language Input Notation Query
Correct answer: Language Integrated Query
LINQ stands for Language Integrated Query, allowing SQL-like queries directly in C# code.
Question 9: In CSS Grid, which property defines the size and number of columns in the grid?
- column-count
- grid-auto-columns
- grid-template-rows
- grid-template-columns (Correct answer)
Correct answer: grid-template-columns
`grid-template-columns` sets the number and width of explicit columns in a grid container, accepting values like `repeat(3, 1fr)`.
Question 10: Which Git command creates a new branch and immediately switches to it in a single step?
- git branch new-branch
- git init new-branch
- git checkout -b new-branch (Correct answer)
- git merge new-branch
Correct answer: git checkout -b new-branch
'git checkout -b branch-name' creates the specified branch and checks it out in one command.
Question 11: Which C# statement is used to re-throw the current exception without losing the stack trace?
- rethrow;
- throw ex;
- throw new Exception();
- throw; (Correct answer)
Correct answer: throw;
Using `throw;` alone re-throws the current exception preserving the original stack trace.
Question 12: What is the purpose of the `[ValidateAntiForgeryToken]` attribute in ASP.NET MVC?
- Enforces HTTPS
- Protects against Cross-Site Request Forgery (CSRF) attacks (Correct answer)
- Checks user authentication
- Validates model data annotations
Correct answer: Protects against Cross-Site Request Forgery (CSRF) attacks
The `[ValidateAntiForgeryToken]` attribute validates a hidden token to protect POST actions from CSRF attacks.
Question 13: In Windows Store apps, which class represents the entry point for application lifecycle events?
- MainPage
- Application (Correct answer)
- CoreWindow
- Frame
Correct answer: Application
The `Application` class handles app lifecycle events like `OnLaunched`, `OnSuspending`, and `OnResuming`.
Question 14: Which API is used to send toast notifications in Windows Store apps?
- ToastNotificationManager (Correct answer)
- NotificationService
- MessageDialog
- PushNotificationChannel
Correct answer: ToastNotificationManager
`ToastNotificationManager` is the WinRT class used to create and display toast pop-up notifications.
Question 15: What HTTP status code should a successful POST request that creates a resource return?
- 200 OK
- 201 Created (Correct answer)
- 202 Accepted
- 204 No Content
Correct answer: 201 Created
HTTP 201 Created indicates a new resource was successfully created, typically with a Location header pointing to it.
Question 16: What does setting InstanceContextMode to PerCall mean in WCF service behavior?
- A new service instance is created for each incoming operation call (Correct answer)
- A new service instance is created for each client session
- One service instance is shared across all clients
- The instance count is determined by the binding
Correct answer: A new service instance is created for each incoming operation call
PerCall creates a new service instance for every operation call, disposing it after the call completes, which is stateless and thread-safe by default.
Question 17: 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
- Runs the method on a new thread
- Compiles the method ahead-of-time
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 18: To develop a Windows Communication Foundation (WCF) Data Services service, you utilize Microsoft Visual Studio 2010 and Microsoft.NET Framework 4. You find out that an application encounters an error when it sends a PUT or DELETE request to the Data Services service. Make that the application can connect to the service. What request type and header should you use in the application?
- An X-HTTP-Method header as part of a GET request
- An HTTP ContentType header as part of a POST request
- An HTTP ContentType header as part of a GET request
- An X-HTTP-Method header as part of a POST request (Correct answer)
Correct answer: An X-HTTP-Method header as part of a POST request
Some proxies, firewalls, and older clients block PUT and DELETE verbs, so WCF Data Services supports tunneling them through a POST request using the X-HTTP-Method header to indicate the intended verb. A GET request or a ContentType header would not carry or trigger the PUT/DELETE operation.
Question 19: In REST API design, what is the purpose of HATEOAS?
- Versioning API endpoints
- Encrypting API payloads
- Authenticating API consumers
- Providing hypermedia links in responses so clients can discover available actions (Correct answer)
Correct answer: Providing hypermedia links in responses so clients can discover available actions
HATEOAS (Hypermedia As The Engine Of Application State) includes links in responses to guide clients to related actions.
Question 20: Which WCF binding supports WS-Security, reliable messaging, and transactions over HTTP?
- BasicHttpBinding
- WebHttpBinding
- NetTcpBinding
- WSHttpBinding (Correct answer)
Correct answer: WSHttpBinding
WSHttpBinding implements WS-* standards including WS-Security, WS-ReliableMessaging, and WS-AtomicTransaction over HTTP.
Question 21: Which CSS3 media query feature would you use to apply styles only when the viewport is narrower than 768px?
- @media screen and (max-width: 768px) (Correct answer)
- @media print and (width: 768px)
- @media all and (viewport: 768px)
- @media screen and (min-width: 768px)
Correct answer: @media screen and (max-width: 768px)
`@media screen and (max-width: 768px)` applies styles when the screen width is 768px or less, targeting mobile viewports.
Question 22: What does the Windows Store app sandbox model restrict?
- Direct access to system resources without declared capabilities (Correct answer)
- Using the XAML framework
- 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 23: Which programming language is NOT supported for developing Windows Store apps?
- C++
- PHP (Correct answer)
- C#
- VB.NET
Correct answer: PHP
Windows Store apps support C#, VB.NET, C++, and JavaScript/HTML, but not PHP.
Question 24: What is the primary purpose of a NuGet package in .NET development?
- To distribute and consume reusable libraries (Correct answer)
- To manage database migrations
- To compile C# source files
- To deploy applications to Azure
Correct answer: To distribute and consume reusable libraries
NuGet is the package manager for .NET used to share and consume reusable code libraries.
Question 25: Which endpoint behavior enables the WCF service to expose its WSDL metadata over HTTP GET?
- ServiceMetadataBehavior (Correct answer)
- ServiceAuthorizationBehavior
- ServiceDebugBehavior
- ServiceCredentials
Correct answer: ServiceMetadataBehavior
ServiceMetadataBehavior with HttpGetEnabled=true publishes the service WSDL at a metadata endpoint, allowing clients to generate proxies with svcutil.exe.
Question 26: In C# generics, what does a `where T : class` constraint enforce?
- T must implement IComparable
- T must be a value type
- T must have a parameterless constructor
- T must be a reference type (Correct answer)
Correct answer: T must be a reference type
The `where T : class` constraint restricts the type argument to reference types only.
Question 27: What is the purpose of the Windows Store app's splash screen?
- Displays ads during loading
- Shows while the app initializes, providing a smooth launch experience (Correct answer)
- Plays an intro animation
- Downloads app updates
Correct answer: Shows while the app initializes, providing a smooth launch experience
The splash screen displays the app's image while it initializes, hiding the loading process from users for a polished start.
Question 28: Which C# feature allows a method to accept a variable number of parameters?
- ref
- optional
- out
- params (Correct answer)
Correct answer: params
The `params` keyword allows a method to accept a variable number of arguments as an array.
Question 29: Which HTML5 attribute on a `<script>` tag makes the script download in parallel without blocking HTML parsing and execute after parsing completes?
- module
- preload
- defer (Correct answer)
- async
Correct answer: defer
The `defer` attribute downloads the script without blocking parsing and guarantees execution after the document has been parsed, in order.
Question 30: What file in a Windows Store app project declares the app's capabilities and identity?
- AssemblyInfo.cs
- Package.appxmanifest (Correct answer)
- App.xaml
- MainPage.xaml
Correct answer: Package.appxmanifest
The `Package.appxmanifest` file declares the app's identity, capabilities, entry points, and visual assets.
Question 31: Which HTML5 API provides access to the device's geolocation?
- document.location
- navigator.location
- navigator.geolocation (Correct answer)
- window.gps
Correct answer: navigator.geolocation
The Geolocation API is exposed through `navigator.geolocation`, providing methods like `getCurrentPosition()` to retrieve coordinates.
Question 32: Which collection in C# is thread-safe and designed for concurrent scenarios?
- ConcurrentDictionary<K,V> (Correct answer)
- ArrayList
- List<T>
- Dictionary<K,V>
Correct answer: ConcurrentDictionary<K,V>
`ConcurrentDictionary<K,V>` in the `System.Collections.Concurrent` namespace is designed for thread-safe access.
Question 33: What is the Model-View-ViewModel (MVVM) pattern's primary benefit in Windows Store app development?
- Enabling direct hardware access
- Faster app certification
- Reducing app manifest size
- Separating UI logic from business logic to improve testability (Correct answer)
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 34: Which JavaScript operator returns the data type of a variable as a string?
- instanceof
- datatype
- typeof (Correct answer)
- typecheck
Correct answer: typeof
The `typeof` operator returns a string indicating the type of the unevaluated operand, such as 'string', 'number', or 'object'.
Question 35: In ASP.NET MVC, what is a Partial View?
- A reusable view fragment rendered inside another view (Correct answer)
- A view without a model
- A controller that returns JSON
- A view that renders a full page layout
Correct answer: A reusable view fragment rendered inside another view
A partial view is a reusable Razor view fragment that can be embedded within other views.
Question 36: In Entity Framework, what happens to an entity when you call `DbContext.Remove(entity)`?
- The entity is detached from tracking
- The entity's properties are set to null
- The entity is marked as Deleted and will be removed on the next SaveChanges() (Correct answer)
- The entity is immediately deleted from the database
Correct answer: The entity is marked as Deleted and will be removed on the next SaveChanges()
`Remove()` marks the entity as `EntityState.Deleted`; the DELETE SQL is issued when `SaveChanges()` is called.
Question 37: AppCache API event fired when downloading <br> Answer: ondownloading
- TRUE (Correct answer)
- FALSE
Correct answer: TRUE
The AppCache (Application Cache) API fires the "downloading" event — handled via ondownloading — when the browser begins fetching resources to populate or update the cache, so the statement is TRUE.
Question 38: 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)
- Allows multiple inheritance
- Makes all methods private
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 39: Which HTML5 form attribute ensures a field must be filled out before the form can be submitted?
- validate
- nonempty
- mandatory
- required (Correct answer)
Correct answer: required
The `required` attribute on an input element prevents form submission and shows a validation message if the field is left empty.
Question 40: What is Azure Blob Storage primarily used for?
- Running virtual machines
- Hosting web applications
- Relational database storage
- Storing unstructured data like images, videos, and documents (Correct answer)
Correct answer: Storing unstructured data like images, videos, and documents
Azure Blob Storage is optimized for storing massive amounts of unstructured data such as files, images, and media.
Question 41: Which access modifier makes a member accessible only within its own class?
- private (Correct answer)
- internal
- protected
- public
Correct answer: private
The `private` modifier restricts access to the containing class only.
Question 42: Which Entity Framework query method defers execution until the results are enumerated?
- FirstOrDefault()
- ToList()
- Count()
- Where() (Correct answer)
Correct answer: Where()
`Where()` returns an `IQueryable<T>` and defers SQL execution until a terminal operation like `ToList()` is called.
Question 43: What does the `virtual` keyword allow in C#?
- Prevents method overriding
- Makes a method thread-safe
- Allows a method to be overridden in derived classes (Correct answer)
- Creates an abstract method
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 44: Which method on the Fetch API is used to parse a JSON response body?
- response.parse()
- response.data()
- response.json() (Correct answer)
- response.text()
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 45: In a Windows Store app, what is the recommended way to store app settings?
- ApplicationData.Current.LocalSettings or RoamingSettings (Correct answer)
- A custom XML file in the app folder
- A SQL Server database
- The Windows Registry
Correct answer: ApplicationData.Current.LocalSettings or RoamingSettings
`ApplicationData.Current.LocalSettings` and `RoamingSettings` provide structured storage for app settings in Windows Store apps.
Question 46: What HTTP status code is returned when a requested resource does not exist in a REST API?
- 500 Internal Server Error
- 401 Unauthorized
- 404 Not Found (Correct answer)
- 400 Bad Request
Correct answer: 404 Not Found
HTTP 404 Not Found indicates the requested resource could not be located on the server.
Question 47: In C#, what is boxing?
- Converting a value type to a reference type (object) (Correct answer)
- Wrapping a class in an interface
- Casting a reference type to a derived type
- Allocating memory on the stack
Correct answer: Converting a value type to a reference type (object)
Boxing converts a value type to the `object` reference type, storing it on the heap.
Question 48: What is the WinRT API in the context of Windows Store apps?
- A web framework for Windows
- A graphics rendering engine
- The Windows Runtime API providing access to OS features for Store apps (Correct answer)
- A testing framework
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 49: What type of navigation does a Windows Store app typically use between pages?
- Tab-based navigation only
- Frame-based navigation using the Frame class (Correct answer)
- Modal dialog stacking
- URL-based routing
Correct answer: Frame-based navigation using the Frame class
Windows Store apps use the `Frame` class to navigate between pages, maintaining a navigation stack.
Question 50: What is data binding in XAML-based Windows Store apps?
- Connecting a database to the app
- Linking UI elements to data sources so the UI updates automatically (Correct answer)
- Defining app capabilities in the manifest
- Serializing objects to JSON
Correct answer: Linking UI elements to data sources so the UI updates automatically
Data binding in XAML automatically synchronizes UI elements with data sources, reducing manual UI update code.
Question 51: Which CSS3 property is used to apply a smooth transition between two states of an element?
- keyframe
- animation
- transition (Correct answer)
- transform
Correct answer: transition
The CSS3 `transition` property specifies the duration and timing of property changes between states.
Question 52: In Azure, which storage type is best suited for storing large amounts of unstructured binary data like images and videos?
- Azure Table Storage
- Azure Queue Storage
- Azure File 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 53: What does INotifyPropertyChanged do in the context of MVVM data binding?
- Handles navigation
- Serializes data to JSON
- Notifies the UI when a property value changes so the binding updates (Correct answer)
- Validates model data
Correct answer: Notifies the UI when a property value changes so the binding updates
Implementing `INotifyPropertyChanged` raises `PropertyChanged` events so data-bound UI elements automatically refresh.
Question 54: Which HTML5 element provides a container for fallback content when the browser does not support the `<canvas>` element?
- <object>
- <embed>
- Content placed between the opening and closing <canvas> tags (Correct answer)
- <noscript>
Correct answer: Content placed between the opening and closing <canvas> tags
Any HTML content placed between `<canvas>` and `</canvas>` is displayed as fallback in browsers that don't support the canvas element.
Question 55: How does Windows Store app submission handle versioning?
- Version numbers are optional
- Version numbers are auto-assigned by the Store
- The version number in the manifest must always be higher than the previous submission (Correct answer)
- Only major versions are tracked
Correct answer: The version number in the manifest must always be higher than the previous submission
Each Store submission requires a version number in the manifest that is strictly higher than the currently published version.
Question 56: Which keyword in C# is used to prevent a class from being inherited?
- static
- abstract
- readonly
- sealed (Correct answer)
Correct answer: sealed
The `sealed` keyword prevents a class from being used as a base class.
Question 57: Which interface must a class implement to use it in a `foreach` loop in C#?
- IEnumerable (Correct answer)
- ICollection
- IComparable
- IList
Correct answer: IEnumerable
A class must implement `IEnumerable` (or `IEnumerable<T>`) to support `foreach` iteration.
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