Basic .NET questions


All the Best


1. What is .NET? .Net is a framework for software development. It consists of three main parts:the Common Language Runtime, the Framework classes, and ASP.NET.


2. What is Namespace? group of classes, structures, interfaces, enumerations, and delegates,organized in a logical hierarchy by function, that enable you to access the core functionality you need in your applications.


3. What is view state? In ASP.NET, the state of a page is maintained in the in the page itself automatically. The property of retaining the values for respective controls even after the page is refreshed is known as view state


4. What is session state ? SessionState persist the data of particular user in the
server. This data available till user close the browser or session time completes


5. What is CLR? CLR executes the code of the program. It converts a MSIL code into the host machine language code, which is then executed appropriately It is responsible of Garbage Collection, Code Access Security, Code Access Security, Code Access Security,


6. What is assembly? Assembly is a single deployable unit that contains information
about the implementation of classes, structures and interfaces. it also stores the information about itself called metadata and includes name and verison of the assembly, security information, information about the dependencies and the list of files that constitute the assembly.Assembly also contains namespaces. In the .Net Framework, applications are deployed in the form of assemblies


7. Does C# support multiple-inheritance? No.

8. What’s the top .NET class that everything is derived from? System.Object


9. Is XML case-sensitive? Yes


10. Explain the differences between Server-side and Client-side code? Server-side
code executes on the server. Client-side code executes in the client's browser


11. Whats MSIL? MSIL is the Microsoft Intermediate Language. All .NET 
compatible languages will get converted to MSIL. MSIL also allows 
the .NET Framework to JIT compile the assembly on the installed 
computer.


12. What base class do all Web Forms inherit from? The Page class.


13. What is a Web Service? A web service is a software component that
exposes itself through the open communication channels of the Internet


14. What is the transport protocol you use to call a Web service?
SOAP (Simple Object Access Protocol) is the preferred protocol


15. What is GAC? The global assembly cache stores assemblies specifically
designated to be shared by several applications on the computer. You 
should share assemblies by installing them into the global assembly cache
only when you need to. Assemblies deployed in the global assembly 
cache must have a strong name.


16. What is "Common Type System" (CTS)? CTS defines all of the basic 
types that can be used in the .NET Framework and the operations 
performed on those type


17. What are the authentication methods in .NET?
        1.WINDOWS AUTHENTICATION
        2.FORMS AUTHENTICATION
        3.PASSPORT AUTHENTICATION
        4.NONE/CUSTOM AUTHENTICATION

18.NET framework overview
1. Has own class libraries. System is the main namespace and all other namespaces are subsets of this.
2. It has CLR(Common language runtime, Common type system, common language specification)
3. All the types are part of CTS and Object is the base class for all the types.
4. If a language said to be .net complaint, it should be compatible with CTS and CLS.
5. All the code compiled into an intermediate language by the .Net language compiler, which is nothing but an assembly.
6. During runtime, JIT of CLR picks the IL code and converts into PE machine code and from there it processes the request.
7. CTS, CLS, CLR
8. Garbage Collection
9. Dispose, finalize, suppress finalize, Idispose interface
10. Assemblies, Namespace: Assembly is a collection of class/namespaces. An assembly contains Manifest, Metadata, Resource files, IL code
11. Com interoperability, adding references, web references
12. Database connectivity and providers


18. DataSet: The dataset is a disconnected, in-memory representation of data. It can be considered as a local copy of the relevant portions of the database.


19. Data Provider: The Data Provider is responsible for providing and maintaining the connection to the database.


20. The Connection Object: The Connection object creates the connection to the database. Types: SqlConnection , OleDbConnection


21. The Command Object: Command objects are used to execute commands to a database across a data connection.. types: SqlCommand and OleDbCommand.
Methods:
ExecuteNonQuery: Executes commands that have no return values such as INSERT, UPDATE or DELETE
ExecuteScalar: Returns a single value from a database query
ExecuteReader: Returns a result set by way of a DataReader object


22. The DataReader Object: The DataReader object provides a forward-only, read-only, connected stream recordset from a database


23. The DataAdapter Object: its act as communication between the database and a DataSet. The DataAdapter is used either to fill a DataTable or DataSet with data from the database with it's Fill method