Sharing and summary of. NET recent interview questions

Sharing and summary of. NET recent interview questions

The following is not the whole content of the NET interview, but rather some that I think may be missed.

最后更新 3/1/2023 11:02 PM
少年知有
预计阅读 11 分钟
分类
.NET
标签
.NET C#

The following is not the whole content of the NET interview, but rather some that I think may be missed.

1. Interview summary

Avoid the pit: Shenzhen Longgang Li Lang YH Co., Ltd.

Because the offer was re-found, interviews started from the 8th to the 12th (11 companies). The overall feeling that the interview was not difficult, but many companies went through the process and did not really need people. Some even chatted for a few words. Let's go back and wait for the notice. It is worth noting that before the interview, you should understand what the company does and the general business is like, because resumes usually match the technical requirements or a certain project is similar, so that you can avoid being unable to answer during the second interview. Interviews in the same city should be as sincere as possible, because each other's hr and management may know each other.

2. Summary of interview content:

Back-end technical points: object-oriented, common algorithms and implementations, common design patterns, C#basics,.. NET Core (middleware, similarities and differences with. NET, IOC/DI, AOP, domestic framework (furion)), EFcore and ORM related, multithreading, performance optimization, caching (Redis, MongoDB), MQ, microservices, distributed (less), Docker (less), CI/CD (less), Linux (less), library and table (less).

Database technical points: sql syntax, index, query optimization, stored procedures, similarities and differences between mainstream databases (SQL server, MySQL, postgresql (less)), deadlocks, transactions, functions, B + trees, red-black trees, B trees (this part is rare).

Front-end technical points: vue, jQuery, uniapp.

Business related: 1. Whether to directly communicate needs with customers or on-site, and how to do it. 2. Explain the functions and scenarios of the project, whether problems have been encountered, and how to solve them.

Interview questions (remember parts):

  1. Tell me about your understanding of object-oriented, what are the characteristics

Reference answer: https://www.example.com

Answer: Object-oriented refers to the abstraction of things in the real world into objects, each object using corresponding methods and attributes. The three major characteristics of object-oriented: inheritance, encapsulation, and polymorphism

  1. Are there any algorithms useful in your daily work?

Reference answer: https://www.example.com www.example.com

Answer: Recursion, bubbling, dichotomy. (I think this question is about the data structure. You can refer to https://blog.csdn.net/heyuchang666/article/details/49891635)

  1. What are common design patterns? What are you using at work?

Reference answer: https://www.example.com

Answer: Adapters, decorators, abstract factories

  1. What are the value types and reference types of C#? what distinguishes

Reference: https://www.example.com Answer: Value types include integer type, floating point type, boolean type, structure, enumeration, tuple, and char, and reference types include class, interface, delegate, record, dynamic, object, and string.

Variables of value type contain instances of type. It differs from variables that reference types, which contain references to instances of types.

Value types are implicitly derived from System. ValueType

  1. What are the C#collections and what are the differences?

Reference: https://www.example.com

Answer: The most commonly used ones are: ArrayList, List, Queue, Hashtable, Dictionary. The difference is that in terms of thread safety and application scenarios, for example, reading of list is thread safe but arrayList is not. List can be used for generic sorting and searching, and Dictionary is used for dictionary collection of key-value pairs. Queue represents a collection of first-in, first-out objects. Queues are used when items need to be accessed on a first-in-first-out basis. Each item in the hash table has a key/value pair. Items in the collection can be accessed directly using the hash key.

  1. What is the difference between char, string, and stringbuild?

Reference: https://www.example.com www.example.com

Answer: Char is used to store single characters. String is a sequential read-only collection of char objects. Each time you modify a string, a new string object is created. The StringBuilder class is different. Each operation operates on its own object rather than generating new objects. The space it occupies will expand with the increase of content. When making a large number of modifications, system performance will not be affected by the generation of a large number of anonymous objects.

  1. NET Framework、.NET Standard、 .. NET Core,. NET 5/6/7 differences

Answer: Both. NET Framework and. NET Core can be used to build multiple types of applications. The. NET Framework framework can only run on windows.

NET Core is a free open source hosted framework for windows, linux, and macos operating systems.

net5/6/7 is a stable version of. NET Core.

NET Standard is a set of specifications, equivalent to a relational table, that maps certain assemblies of the. NET Framework to.. NET Core

  1. Talk about your understanding of. NET Core middleware and pipelines

Reference: https://www.example.com view=aspnetcore-6.0

Answer: The complete request processing of an application is called a pipeline. Middleware is a component assembled into the application pipeline to process requests and responses. It is often used for logging, exception trapping, request interception, and caching processing.

  1. What are IOC, DI, and AOP, why they are used, and how to use them

Reference: https://www.example.com

IOC is control inversion, which is an idea that hands over the specific implementation of a class to an external container rather than directly instantiate it by the class. Through this inversion, control is handed over to the external container, reducing the coupling between classes.

DI is dependency injection, which is a concrete implementation of IOC. It is responsible for combining dependencies between classes and has three life cycles:

  • The Transient service is always different, and a new instance is created each time the service is retrieved.
  • The Scoped service only changes with the new scope, but it is the same instance within a certain scope.
  • The Singleton service is always the same, and a new instance is created only once.

Native DI supports construct injection or ServiceProvider. CreateScope. GetService to obtain instances. If you need to extend injection, you can use autofac AOP is a technology that is oriented to aspect programming and realizes unified maintenance of program functions through pre-compilation methods and dynamic proxies during runtime. My understanding is to dynamically map dll to obtain class instances at runtime

  1. EF Core and ORM related

Reference: https://www.example.com

Answer: ORM refers to the mutual conversion between the object-oriented object model and the data structure of a relational database. EF has three programming methods: Database First, Model First, and Code First.

  1. Multi-threaded look at this https://www.example.com

  2. Check out this for redis interview: https://www.example.com

  3. What is an index and what types of indexes are there (SQL Server)

Reference: https://www.example.com view=sql-server-ver16

Answer: Indexing is used to speed up query performance. It retrieves data from tables faster

  1. What is a stored procedure? What are the advantages and disadvantages?

Answer: A stored procedure is a set of SQL statements that are stored in a database to perform specific functions.

Advantages of stored procedures:

    1. high efficiency

After the stored procedure is compiled once, it is saved to the database and executed directly every time it is called. Ordinary sql statements need to be saved elsewhere (for example: Notepad) and must be analyzed and compiled before being executed. So stored procedures are more efficient for you.

    1. reduce network traffic

The stored procedure will be placed in the database after compilation. When we call it remotely, we will not transfer a large number of string-type sql statements.

    1. High reusability

Stored procedures are often written for a specific function, and when this specific function needs to be completed again, the stored procedure can be called again.

    1. High maintainability

When small changes occur in functional requirements, modifying the previous stored procedures is easier and requires less effort.

    1. high safety

A stored procedure that completes a specific function is generally only available to specific users, has usage identity restrictions and is more secure.

Disadvantages of stored procedures:

  • The stored procedure syntax for each database is almost different and is very difficult to maintain (not universal)
  • Business logic is placed on the database and is difficult to iterate

Handwritten:

create proc StuProc
@sname varchar(100)
begin
select S#,Sname,Sage,Ssex from student where sname=@sname
end
go
exec StuProc '赵雷' //执行语句
  1. What is a deadlock and how to avoid it.

Answer: Deadlock refers to the phenomenon of two or more processes waiting for each other during the execution process due to competition for resources. Without external force, none of them will be able to advance. Access objects in the same order, avoid user interaction in transactions, keep transactions short and in one batch, design indexes rationally to avoid full table scanning

  1. SqlServer function creation: https://www.example.com

  2. What is a business and what are its characteristics

A: A transaction is a mechanism, a sequence of operations, consisting of a set of database operation commands. A transaction submits or revokes all commands to the system as a whole, i.e., this set of database commands is either executed or not executed, so the transaction is an indivisible logical unit of work. It has four properties: Atomicity, Consistency, Isolation, and Durability, which are often abbreviated as ACID.

Front-end part: vue related basic knowledge, component communication and reuse, the difference with jQuery, js syntax, js foundation, common ui framework, etc.

You will also ask about cache middleware, message middleware, logging middleware (log reporting and statistics), table and library division, cache persistence and consistency, master-slave synchronization, data read and write separation, database B + trees, red and black trees, B trees, etc.

Keep Exploring

延伸阅读

更多文章
同分类 / 同标签 4/22/2026

Support for. NET by operating system versions (250707 update)

Use virtual machines and test machines to test the support of each version of the operating system for. NET. After installing the operating system, it is passed by measuring the corresponding running time of the installation and being able to run the Stardust Agent.

继续阅读
同分类 / 同标签 2/7/2026

Summary of experience in using AOT

From the very beginning of project creation, you should develop a good habit of conducting AOT release testing in a timely manner whenever new features are added or newer syntax is used.

继续阅读