Explain role-based security.
Role-based security is used to implement security measures based on the role assigned to the users in the organization. Then we can authorize users based on their roles in the organization. For example, windows have role-based access like user, administrators, and guests.
What are EXE and DLL?
EXE is an executable file that works as an application and it runs individually as it contains an entry point. DLL is a Dynamic Link Library which is a supportive file to other applications, and it cannot run individually.
What is .Net Reflection?
Reflection objects are used for creating type instances and obtaining type information at runtime. The classes in the System.Reflection namespace gives access to the metadata of a running program.
What is the difference between dispose() and finalize()?
Although Dispose and Finalize both methods are used by CLR to perform garbage collection of runtime objects of .NET applications but there is a difference between them.
The Finalize method is called automatically by the runtime while the Dispose method is called by the programmer.
Explain the different parts of the assembly.
Following are the different parts of assembly:
- Manifest: It has the information about the version of the assembly.
- Type Metadata: Contains the binary information of the program
- MSIL: Microsoft Intermediate Language Code
- Resources: List of related files
What are the most important aspects of .NET?
.NET is an open-source platform containing around 32 programming languages and several tools for application creation. It is highly secure and runs comfortably on multiple computer platforms.
What is Shadowing?
Shadowing makes the method of the parent class available to the child class without using the override keyword. It is also known as Method Hiding.
What is the difference between trace class and debug class?
The call to Debug class is included in Debug mode only and it is used at the time of application development. While the call to Trace class will be included in Debug as well as Release mode also and it is used at the time of application deployment.
Discuss the difference between constants and read-only variables.
While constants and read-only variable share many similarities, there are some important differences:
- Constants are evaluated at compile time, while the read-only variables are evaluated at run time.
- Constants support only value-type variables (the only exception being strings), while read-only variables can hold reference-
- type variables.
- Constants should be used when the value is not changing during run time, and read-only variables are used mostly when their actual value is unknown before run time.
- Read-only variables can only be initialised at the time of declaration or in a constructor.
How many elements a tuple can hold?
A tuple can hold up from 1 to 8 elements. In the case of more than 8 elements, then the 8th element can be defined as another tuple. Tuples can be specified as parameter or return type of a method.