CLR is abbreviated as Common Language Runtime and it forms heart of the .NET framework. It is the responsibility of runtime to take care of the code execution of the program. CLR takes care of the following:
★ Garbage Collection
★ Code Verification
★ Code Access Security
★ IL (Intermediate Language)
Common Language Specification is a subset of CTS and it is used to unite all languages in to one umbrella. This extends to support all the .NET language into one unit.
3. Which classes a DLL can contain?
Unlimited number of classes can be present in a DLL.
Deep copy is nothing but creating a new object and then copying the non-static fields of the current object to new object.
Managed Code is used to run inside the CLR environment and it is called as .NET run time. All Intermediate Language (IL) are set to be Managed code.
6. How to store decimal data in .NET?
BinaryWriter is used to store decimal data in .NET.
7. So you know which DLL Is used for Microsoft .NET run time?
Mscoree.dll is used for Microsoft .NET runtime DLL.
8. Which class allows an element to be accessed using Unique key?
Hash table is the collection class that allows an element to be accessed using Unique key.
.NET framework provides security features to secure code from unauthorized users. There are two types of security in .NET:
★ Role based security - Authorizes User
★ Code access security - Protects system resources from unauthorized calls
10. Tell me how many .NET languages can a single .NET DLL contain?
Only one language will be supported by one DLL.
11. Described strong typing and weak typing?
Strong type is checking the types of variables at compile time and weak type is checking the types of system as late as possible which is nothing but run time.
12. Can you please explain the difference between thread and process?
Thread is used to execute more than one program at a time. Whereas, Process executes single program at a time.
13. List the two main parts of .NET?
They are - Common Language Runtime (CLR) and .NET Framework class library.
14. Define serialization in .Net?
Serialization is defined as a process of converting an object to stream of bytes. This is used mainly to transport objects.
15. Explain Convert.tostring and i.tostring method?
Convert.tostring handles Null and i.tostring does not handle null.
16. Tell us how many languages are supported by .Net?
Following are the languages supported by VB.Net:
★ C#
★ VB.Net
★ COBOL
★ Perl
17. List the types of generations in garbage collector?
There are three types of generations in garbage collector.
Generation 0 - This identifies a newly created object that has been never marked for collection.
Generation 1 - This identifies an object which has been marked as collection but not removed.
Generation 2 - This identifies an object that has survived more than one sweep of the Garbage collector.
CTS is Common Type System which is used to communicate smoothly between the languages. For example, if VB has Integer data type and C++ has long data type and these data types are not compatible.
In order to be compatible, CTS can be used as an interface between two languages.
19. Explain Global Assembly Cache (GAC)?
GAC is used where shared .NET assembly resides. It is used in the following criteria:
★ If .Net assembly has special security requirements
★ If .Net application has to be shared with other applications
20. List the types of Authentication?
There are three types of Authentication and they are:
★ Windows Authentication
★ Forms Authentication
★ Passport Authentication
21. Can you please explain the difference between Authentication and Authorization?
Authentication is the process of obtaining credentials from the users and verifying the user's identity. Authorization is the process of giving access to the authenticated resources. Authentication leads to Authorization.
TRACE allows the user to view how the code has been executed in detail. This tells how the code is working.
23. Can you please explain the difference between value and reference types?
Value types directly store the data and it is allocated to stack. Reference type store a reference to the value's memory address and are allocated to heap.
24. Can you please explain the difference between Dataset and Datareader?
DataReader:
★ Datareader has read only access to the data and it is set to be forward only.
★ Datareader cannot persist contents as it is read only
★ Datareader is connected architecture
Dataset:
★ Dataset can hold more than one table from the same data source. It even stores relationships between tables.
★ Dataset can persist contents
★ Dataset is disconnected architecture
25. Explain about Globalization?
Globalization is nothing but making the application Internationalize and localizing the application to other languages or cultures. Culture is nothing but a combination of Language(English) and the location like US or UK.
A delegate is defined as an object that can refer to a method. Whenever a delegate is assigned to a method, it behaves exactly like that method.
An Enumerator or Enum is a value type with a set of constants given to the set of the list. Enumeration is used when definition is required for more than one number.
A class that can be declared within the scope of another class. These classes are considered within the scope of the enclosed class and are available within that class or scope.
Hashtable is set to be items with key and value pairs. Keys are referred as indexes and quick search can be performed for values by searching through the keys.
30. Can you please explain the difference between int and int32?
Int32 represent 32-bit signed integer whereas int is not a keyword used in VB.Net.
31. Can you please explain the difference between System.String and System.StringBuilder classes?
System.string class is non-updatable and it will create new string object instead of updating the same. But updation in the same string object is possible for String. Stringbuilder class. So, the operation on string builder is faster and efficient than the string class.
32. Explain the use of Option explicit?
Variable must be compulsorily declared when the Option Explicit is termed as ON. If it is OFF, variables can be used without declaration.
A Manifest is a text file that is used to store metadata information of .NET assemblies. File type of Manifest can be saved as a type PE. Assembly Name, Version, Culture and key token can be saved as a Manifest.
34. Explain the use of New Keyword?
New keyword is used with the constructor in which it can be used as a modifier or an operator. When it is used as a modifier, it hides inherited member from the base class member. When it is used as an operator, it creates an object to invoke constructors.
Dim frm As New Form1 frm.show()
35. Explain about Garbage Collection?
Garbage collection is also known as automatic memory management, which is used for automatic recycling of dynamically allocated memory. Garbage collection is performed by Garbage collector which will recycle memory if it is proven that memory will be unused.