1. Differences between override and overload
Override modifier, overwriting a method in the base class... the overload is to re-write the method of the same name to implement different functions. thus, a method has different versions. the essential difference between override and overload is that the override modifier is added, and this method is always used only by you .. the difference is like:
Override is like
Your name is James. Your father changed your name to Li Si...
Reload is like
You are zhang san, but other people can also be Zhang San ..
2. What is the error handling mechanism of. net?
Error handling sequence: finally First, catch second, and finally try code .. cancel this operation. returns exception information in catch. of course, you can also customize your own error handling mechanism... if your exception handling contains finally blocks. then this finally will always be executed regardless of whether an exception occurs...
3. Similarities and differences between interfaces and classes in C #
The difference between interfaces and classes is essential .. class is responsible for implementing functions, while interface is responsible for defining functions .. the project can use the implementation interface to understand the concepts of class, Operation class, and abstract class .. to achieve a high degree of abstraction .. you can also call an interface a non-functional class.
Override is an abstract method. It is used when a base class cannot provide any implementation meaning for a method, if the method body of a method in a base class is not clear, it can be defined as an abstract method. In this way, it is forced to implement this method by inheriting its subclass, otherwise, it cannot be instantiated. This is my personal understanding. I don't need to reload it. If I understand it, I will know where their differences are.
4. Differences between DataReader and DataSet
The biggest difference between DataReader and DataSet is that DataReader always occupies SqlConnection and operates databases online .. any operation on SqlConnection will cause DataReader exceptions .. because DataReader only loads one piece of data in the memory each time, the occupied memory is very small .. because of the special nature and high performance of DataReader. so DataReader is only in .. after reading the first article, you cannot read the first article again ..
DataSet loads data in memory at one time. abandon database connection .. the database connection is abandoned after reading .. because DataSet loads all data in the memory. therefore, memory consumption is relatively high... but it is more flexible than DataReader .. you can dynamically add rows, columns, and data. perform a back-to-back update operation on the database...
The biggest difference between DataReader and DataSet is that DataReader always occupies SqlConnection and operates databases online .. any operation on SqlConnection will cause DataReader exceptions .. because DataReader only loads one piece of data in the memory each time, the occupied memory is very small .. because of the special nature and high performance of DataReader. so DataReader is only in .. after reading the first article, you cannot read the first article again ..
DataSet loads data in memory at one time. abandon database connection .. the database connection is abandoned after reading .. because DataSet loads all data in the memory. therefore, memory consumption is relatively high... but it is more flexible than DataReader .. you can dynamically add rows, columns, and data. perform a back-to-back update operation on the database...
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service