Câu hỏi phỏng vấn .NET Core
Câu hỏi

What is the difference between Class Library (.NET Standard) and Class Library (.NET Core)?

Câu trả lời

The difference between a Class Library (.NET Standard) and a Class Library (.NET Core) primarily lies in their compatibility and intended use cases.

Class Library (.NET Standard)

  • Purpose: .NET Standard is a formal specification of .NET APIs that are intended to be available across all .NET implementations. It is designed to provide a uniform set of APIs that can be used across different .NET platforms, such as .NET Framework, .NET Core, Xamarin, and others.
  • Compatibility: Libraries targeting .NET Standard can be used by any .NET implementation that supports the specified version of .NET Standard. This makes .NET Standard libraries highly portable and reusable across different .NET environments.
  • Use Case: Ideal for creating libraries that need to be shared across multiple .NET platforms. For example, if you need a library that works on both .NET Framework and .NET Core, you should target .NET Standard[1][3][4][7].

Class Library (.NET Core)

  • Purpose: .NET Core is a cross-platform framework designed for building modern, cloud-based, and internet-connected applications. It is optimized for performance and scalability.
  • Compatibility: Libraries targeting .NET Core can only be used by applications that run on the .NET Core runtime. They are not compatible with .NET Framework or other .NET implementations unless those implementations also support .NET Core.
  • Use Case: Best suited for applications that are specifically built to run on .NET Core, such as cross-platform applications that need to run on Windows, macOS, and Linux. It is also the recommended choice for new projects that do not need to support older .NET implementations[1][2][4][9].

Key Differences

  1. Portability: .NET Standard libraries are more portable and can be used across multiple .NET implementations, whereas .NET Core libraries are limited to the .NET Core runtime.
  2. API Surface Area: .NET Standard lib...
middle

middle

Gợi ý câu hỏi phỏng vấn

senior

What is the difference between AppDomain , Assembly , Process and a Thread ?

middle

What is Kestrel?

middle

What officially replaces WCF in .Net Core?

Bình luận

Chưa có bình luận nào

Chưa có bình luận nào