What is .NET?
.NET is a framework for software development. It is just like other software development framework like (J2EE). It provides runtime capabilities and a rich set of pre-built functionality in the form of class library and API’s. This .NET framework is an environment to build, deploy and run web services and other applications.
The .NET framework contains three main parts:
- Common Language Runtime
- Framework classes
- ASP.NET
Explain the difference between Function and Stored procedure?
Stored Procedures are pre-compiled objects which execute the code when called for. While a Function is compiled and executed when it is called for.
Explain CAS (Code Access Security).
.Net provides a security model that prevents unauthorized access to resources. CAS is a part of that security model. CAS is present in the CLR. It enables the users to set permissions at a granular level for the code.
CLR then executes the code depending on the available permissions. CAS can be applied only to the managed code. Unmanaged code runs without CAS. If CAS is used on assemblies, then the assembly is treated as partially trusted. Such assemblies must undergo checks every time when it tries to access a resource.
What are EXE and DLL?
EXE and DLL are assembly executable modules.
EXE: It is an executable file that runs the application for which it is designed. When we build an application, an exe file is generated. Therefore the assemblies are loaded directly when we run an exe. But an exe file cannot be shared with other applications.
DLL: It stands for dynamic link library that consists of code that needs to be hidden. The code is encapsulated in this library, an application can have many DLLs and can also be shared with other applications.
What are the types of caching in .NET?
There are 3 types of caches in .NET:
- In-Memory Cache
- Persistent in-process Cache
- Distributed Cache
What is business logic?
It is the application processing layer that coordinates between the User Interface Layer and Data Access Layer.
You would know that System.Object is the parent class of all .NET classes; In other words all types in .NET (whether implicit, explicit, or user-created) derive from the System.Object class. What are the various methods provided to System.Object’s deriving classes/types?
System.Object provides the following important methods, among others:
- ToString—Returns a string that represents the current object
- both overrides of Equals(object), Equals(object, object)
- GetHashCode
- Finalize
- GetType
- ReferenceEquals
- MemberwiseClone
Most of these methods provide the basic implementation required of any type that a developer will work with in the .NET stack.
What is .NET Framework and what are the main components of it?
.NET Framework facilitates the developer to develop, run and deploy the applications like console application, window Forms applications, web applications, web services, window services etc. It also provides environment to create sharable components to be used in distributed computing architecture.
Main components of .Net Framework:
- Class library
- Common Language Runtime (CLR)
- Dynamic Language Runtime (DLR)
- Application Domains
- Runtime Hosts
- Cross-language interoperability
- Framework security
- Profiling etc.
What is LINQ?
It is an acronym for Language integrated query which was introduced with visual studio 2008. LINQ is a set of features that extend query capabilities to the .NET framework language syntax that allows data manipulation irrespective of the data source. LINQ bridges the gap between the world of objects and the world of data.
What is a constructor in C#?
A constructor is a special method of the class that contains a collection of instructions and gets automatically invoked when an instance of the class is created.