Practice to learn Asp.Net C# interview Questions for freshers
Q. What is the difference between “throw ex” and “throw” methods in C# ?
A. “throw ex” will replace the stack trace of the exception with stack trace info of re throw point.
“throw” will preserve the original stack trace info.
Q. What is a Data table?
A. Datatable is a collection of rows, columns, and constraints.
A Datatable is able to perform disconnected data access.
Q. What is DataView in asp.net?
A. A DataView control creates a customized view of data stored in Datatable. The changes in DataView will affect the Datatable. By default, every table has a data view attached to it.
You can then add the DataView control and bind it to a Windows form. It allows the user to filter, navigate and sort the data in it.
Q. What are the challenges in accessing data from a database?
A. The challenges include:
More than one user might need to access the data simultaneously from one database.
More than one user might need to access the data anytime, anywhere 24/7.
The solution to this problem is attained by implementing a ‘Database locking’ during the time of transaction execution.
Q. What is meant by ‘Transaction’ in a database and it’s ‘Properties of Transaction’?
A. Transaction can be defined as a series of operation. If the transaction is successful, all the data modifications performed in the database will be committed and saved.
Properties of Transaction – is ACID
Q. What is the Difference between session and caching?
A. The main difference between session and caching is: a session is per-user based but caching is not per-user based.
Session data is stored at the user level but caching data is stored at the application level and shared by all the users. It means that it is simply session data that will be different for the various users for all the various users, session memory will be allocated differently on the server but for the caching only one memory will be allocated on the server and if one user modifies the data of the cache for all, the user data will be modified.