Search test library by skills or roles
⌘ K

Adaface Sample .NET Questions

Here are some sample .NET questions from our premium questions library (10273 non-googleable questions).

Skills

🧐 Question

Medium

AppDomain Resource Scoping
Configuration Management
AppDomain
Resource Scoping
Solve
Consider a scenario where you have a .NET application that needs to load different configurations for different components running in separate AppDomains. You have the following code structure:
 image
The `ConfigManager` class is designed to load and store configurations for different domains. What will be the output of this program, assuming `ConfigA.xml` and `ConfigB.xml` contain distinct settings?
A: Config in DomainA: [Settings from ConfigA.xml], Config in DomainB: [Settings from ConfigB.xml]
            B: Config in DomainA: null, Config in DomainB: null
            C: Config in DomainA: [Settings from ConfigB.xml], Config in DomainB: [Settings from ConfigA.xml]
            D: A runtime exception is thrown due to cross-domain operation.
            E: Config in DomainA: [Settings from ConfigA.xml], Config in DomainB: [Settings from ConfigA.xml]
            F: The output is unpredictable and depends on the runtime environment.

Medium

IDisposable Pattern
Garbage Collection
IDisposable Pattern
Memory Management
Solve
Consider the following .NET C# code snippet implementing IDisposable pattern:
 image
What is true about the garbage collection and resource management in this code?
A: The finalizer will always be called when the object is garbage collected.
            B: The `Dispose` method is only called when explicitly invoked.
            C: Managed resources will be freed in the finalizer.
            D: Unmanaged resources are only freed if `Dispose` is called with `true`.
            E: The `GC.SuppressFinalize` method prevents the finalizer from being called.
            F: The `using` statement ensures that unmanaged resources are always freed.

Medium

Remoting and Object Lifetime
.NET Remoting
Object Lifetime
MarshalByRefObject
Solve
In a .NET application, you are using .NET Remoting to communicate between different application domains. You have the following server-side code:
 image
This `RemoteObject` class is hosted in one application domain and accessed from another. Considering the lease settings (InitialLeaseTime, SponsorshipTimeout, RenewOnCallTime), what will happen if a client accesses the `GetData` method every 3 seconds?
A: The object will be disconnected after 5 seconds, regardless of the calls.
            B: The lease will be renewed, and the object remains accessible as long as it's called every 3 seconds.
            C: The object will be disconnected after 7 seconds, even with the regular calls.
            D: An exception will be thrown due to lease timeout.
            E: The lease will be renewed indefinitely without disconnection.
            F: The object will be disconnected only if there is a call after 5 seconds but within 7 seconds.
🧐 Question🔧 Skill

Medium

AppDomain Resource Scoping
Configuration Management
AppDomain
Resource Scoping

3 mins

.NET
Solve

Medium

IDisposable Pattern
Garbage Collection
IDisposable Pattern
Memory Management

2 mins

.NET
Solve

Medium

Remoting and Object Lifetime
.NET Remoting
Object Lifetime
MarshalByRefObject

3 mins

.NET
Solve
🧐 Question🔧 Skill💪 Difficulty⌛ Time
AppDomain Resource Scoping
Configuration Management
AppDomain
Resource Scoping
.NET
Medium3 mins
Solve
IDisposable Pattern
Garbage Collection
IDisposable Pattern
Memory Management
.NET
Medium2 mins
Solve
Remoting and Object Lifetime
.NET Remoting
Object Lifetime
MarshalByRefObject
.NET
Medium3 mins
Solve

Trusted by recruitment teams in enterprises globally

Amazon Morgan Stanley Vodafone United Nations HCL PayPal Bosch WeWork Optimum Solutions Deloitte Microsoft NCS Doubtnut Sokrati J&T Express Capegemini

We evaluated several of their competitors and found Adaface to be the most compelling. Great library of questions that are designed to test for fit rather than memorization of algorithms.


Swayam Narain, CTO, Affable

hashtag image heart icon Swayam
customers across world
Join 1500+ companies in 80+ countries.
Try the most candidate friendly skills assessment tool today.
g2 badges
Ready to streamline your recruitment efforts with Adaface?
Ready to streamline your recruitment efforts with Adaface?
logo
40 min tests.
No trick questions.
Accurate shortlisting.
ada
Ada
● Online
Previous
Score: NA
Next
✖️