1. Is it possible to make a call to a non-static method from within a static method?
Answer: No. Because a non-static method is associated with an object, you must create an object before you can make a method call on the object, and the static method call does not need to create the object, which can be called directly.
That is, when a static method is called, there may not be any instance objects created, and if a static method is called from a static method, the non-static method does not have an associated object, so it cannot.
2, say some common classes, interfaces, please list 5.
Answer: Class: StreamReader, StringBuilder, SqlConnection, FileStream, File, Regex
Interfaces: IDisposable, IEnumerable, IComparable, ICollection, IList
3. Does C # support multiple inheritance?
A: Support between the classes is not supported, between interfaces.
A class-to-interface is called an implementation, not an inheritance.
The class is Father, interface is ability, ability can have multiple, but can not have multiple father.
4. Simple explanation of the advantages and disadvantages of database indexing.
A: Advantages, using an index can speed up the data query.
Disadvantage, the index is indexed during data insertion, so it can slow down data insertions, updates, and disk usage.
If a table query can be indexed more frequently than writes, indexing is not recommended if the write is more frequent than the query.
5. Why does SQL injection vulnerability occur? How to Prevent.
A: The program development process is not aware of writing SQL statements and filtering special characters, resulting in the client can submit some SQL statements to execute normally.
1. SQL statements try not to omit quotation marks and single quotes.
2. Filter out some keywords in the SQL statement.
3, control error messages, do not output error messages on the browser.
4, use the SqlParameter class, try not to stitch string SQL statements.
. NET Basics (vi)