.NET Core Interview Questions
Q: What is .NET Core?
.NET Core is a modern Microsoft framework for creating applications that can run platform agnostic. .NET core has performance gains over its predecessor technology ASP.NET where it’s been shown as 2400% times faster. .NET core can handle up to 7,000,000 HTTP requests per second. .NET core is developed in C++ and C#.
Q: What is .NET 5?
.NET 5 will become the successor to .NET core and be the unified platform. This platform will bring all of .NET under one roof to use the BCL (Base Class Libraries).
Microsoft.com: Announcing .NET 5.0 Preview 1
Q: What languages are supported in .NET Core?
C#, F#, Visual Basic
Q: How is .NET Core different than traditional ASP.NET?
The original .NET Framework was shipped in 2002 as only a single framework. .NET core is decoupled from the underneath system. This allows it to be cross-platform where traditional ASP.NET could only be run in Windows, typically under IIS. .NET in general is an ECMA standard with many different implementations including .NET Framework, Mono, Unity, and .NET Core.
Q: Is .NET Core open source?
Yes, Microsoft has open sourced .NET Core.
Q: How is .NET Core cross-platform?
.NET Core is cross-platform and can run on multiple distributions of Linux, Windows, and OS X. It also supports different CPU architectures. .NET Core is modular in design and architecture.
Q: What is Middleware in ASP.NET Core?
Middleware is code that runs in an apps pipeline to handle requests and responses. Some common middleware is written to handle authentication, logging, routing, and CORS.
Microsoft: ASP.NET Core Middleware
Q: How does Dependency Injection (DI) work in .NET Core?
The .NET Core framework includes a dependency injector built into the middleware.
Microsoft: Dependency injection ASP.NET Core
Q: What are the differences between Transient, Singleton, and Scoped objects?
Transient lifetime are created each time they are requested from the container.
Scoped lifetime services are created once per client request.
Singleton lifetime services are created the first time they’re request and injected to use the same instance.
Q: What is the Kestrel Server?
Kestrel is an edge server that is cross-platform used for serving web applications that run on .NET core.
Microsoft: Kestrel web server implementation in ASP.NET Core
Q: What does Self-Contained mean for .NET Core?
Self-contained is a publishing option for creating a platform-specific executable.
Microsoft: Publish self-contained
Q: What happened to the web.config file? How are settings and configuration handled in .NET Core?
.NET Core uses JSON based configuration settings file and the web.config file is no longer used.
Q: What can you tell me about the new serializer in .NET Core 3.1
With the release of .NET Core 3.1 comes a new native serializer that is more performant than Newtonsoft.Json’s serializer.
Q: What is Roslyn Compiler?
The Roslyn compiler is a cross-platform compiler used with .NET core. It is even developed in C# and VB.NET.
Q: What is .NET CoreCLR?
CoreCLR is the .NET execution engine in .NET Core. It is responsible for performing functions such as garbage collection and compilation to machine code. Also an open source project.
Q: What is the .NET Portability Analyzer
A tool that allows developers to scan existing libraries to see how much work is required to make their platform run on .NET core.
Q: What is the .NET Foundation?
The .NET Foundation is an open source non-profit organization that was incorporated on March 31st, 2014. Their purpose is to support open source projects and bring the community together. The .NET Foundation’s website has workshops, e-books and tutorials that can help all developers grow their skill sets in the .NET ecosystem.
Q: What is Channel 9?
Channel 9 is a Microsoft (MSDN) show where hosts present talks and demonstrations on Microsoft related technologies.