C#/.NET Flashcards
**What is the Common Language Runtime (CLR)?
run-time environment that runs the code and provides services that make the development process easier.
**What is intermediate language (IL)?
object-oriented programming language designed to be used by compilers for the . NET Framework before static or dynamic compilation to machine code
?Can C# and VB .NET code interact? Are there any limitations around this?
yes, they can use their natural compiler ( C# –> CSC Compiler, VB –> VB Compiler ) to generates the IL and that is understandable by other languages.
NEED TO ADD LIMITATIONS
What’s the difference between .NET and C#?
.NET is like an umbrella that covers both .NET framework (an application framework library) and the Common Language Runtime, C# is a programing language under the .NET umbrella
**What’s the difference between .NET Framework, .NET Core, and .NET Standard?
. NET Core is an implementation of the . NET Standard that’s optimized for building console applications, Web apps and cloud services using ASP.NET Core. and .NET framework (an application framework library)
What’s the difference between .NET and ASP .NET?
NET is a software development framework aimed to develop Windows, Web and Server based applications. ASP.NET is a main tool that present in the .NET Framework and aimed at simplifying the creation of dynamic webpages.
***How do you set up dependency injection in ASP .NET Core?
???ASP.NET Core is designed from scratch to support Dependency Injection. ASP.NET Core injects objects of dependency classes through constructor or method by using built-in IoC container.
How does .NET exception management work?
exception is thrown from an area of code where a problem has occurred. The exception is passed up the stack until the application handles it or the program terminates.
***What’s the purpose of a using statement?
using statement is used to set one or more than one resource, defines a boundary for the object outside of which, the object is automatically destroyed
What is ASP .NET MVC?
MVC is a design pattern used to decouple user-interface (view), data (model), and application logic (controller).
How does MVC Routing work?
Using the MVC pattern for websites, requests are routed to a Controller that is responsible for working with the Model to perform actions and/or retrieve data. The Controller chooses the View to display and provides it with the Model. The View renders the final page, based on the data in the Model.
**What’s the difference between a reference type and a value type?
A Value Type holds the data within its own memory allocation (???on the stack??) and a Reference Type contains a pointer to another memory location that holds the real data (??on the heap??).
**What is the readonly keyword?
modifier that can be used 1) in field declaration to indicate that assignment to the field can only occur as part of the declaration or in a constructor in the same class. 2) readonly struct type definition, readonly indicates that the structure type is immutable. 3) instance member declaration within a structure type, readonly indicates that an instance member doesn’t modify the state of the structure. 4) ref readonly method return, the readonly modifier indicates that method returns a reference and writes aren’t allowed to that reference.
What is the sealed keyword?
tells the compiler that the class is sealed, and therefore, cannot be extended. No class can be derived from a sealed class
**What is the virtual keyword?
used to modify a method, property, indexer, or event declaration and allow for it to be overridden in a derived class.