BCL(基类库)与 FCL(框架类库)

发布于 2024-07-19 13:04:23 字数 29 浏览 4 评论 0原文

两者有什么区别? 我们可以互换使用它们吗?

What's the difference between the two? Can we use them interchangeably?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(7

萝莉病 2024-07-26 13:04:23

基类库 (BCL) 字面意思就是基础。 它包含基本的基本类型,例如 System.String 和 System.DateTime。

框架类库 (FCL) 是更广泛的库,包含全部内容:ASP.NET、WinForms、XML 堆栈、ADO.NET 等。 您可以说FCL包括BCL。

The Base Class Library (BCL) is literally that, the base. It contains basic, fundamental types like System.String and System.DateTime.

The Framework Class Library (FCL) is the wider library that contains the totality: ASP.NET, WinForms, the XML stack, ADO.NET and more. You could say that the FCL includes the BCL.

£噩梦荏苒 2024-07-26 13:04:23

BCL

BCL 是一个 .NET Framework 库,是 C# 运行时库的标准,也是公共语言基础结构 (CLI) 标准库之一。 BCL 提供了表示内置 CLI 数据类型、基本文件访问、集合、自定义属性、格式、安全属性、I/O 流、字符串操作等的类型。

整箱

.NET Framework 类库正如其名称所暗示的那样:一个类和其他类型的库,开发人员可以使用它来使他们的生活更轻松。 虽然这些类本身是用 C# 编写的,但它们可以在任何基于 CLR 的语言中使用

您将在每种项目类型中使用 BCL 和 FCL 的某些部分。 System.Windows.Forms(一个单独的库)或 System.Web,以及来自 mscorlib 和 System.dll 的 BCL

BCL:

A .NET Framework library, BCL is the standard for the C# runtime library and one of the Common Language Infrastructure (CLI) standard libraries. BCL provides types representing the built-in CLI data types, basic file access, collections, custom attributes, formatting, security attributes, I/O streams, string manipulation, and more.

FCL:

The .NET Framework class library is exactly what its name suggests: a library of classes and other types that developers can use to make their lives easier. While these classes are themselves written in C#, they can be used from any CLRbased language

You'll be using the BCL with some parts of the FCL with each project type. So System.Windows.Forms (a separate library) or System.Web, with the BCL from mscorlib and System.dll

夜夜流光相皎洁 2024-07-26 13:04:23

BCL代表基类库,也称为类库(CL)。 BCL 是框架类库 (FCL) 的子集。 类库是与 CLR 紧密集成的可重用类型的集合。 基类库提供了有助于执行日常操作的类和类型,例如处理字符串和基本类型、数据库连接、IO 操作。

而Framework类库包含数千个用于构建不同类型应用程序的类,并提供应用程序所需的所有基本功能和服务。 FCL 包括支持不同应用程序的类和服务,例如

  • 桌面应用程序、

  • Web 应用程序(ASP.Net、MVC、WCF)、

  • 移动应用程序、

  • Xbox 应用程序、

  • Windows 服务等

更多详细信息,请访问.Net 中的 BCL/ CL 是什么?

输入图像描述这里

BCL stands for Base class library also known as Class library (CL). BCL is a subset of Framework class library (FCL). Class library is the collection of reusable types that are closely integrated with CLR. Base Class library provides classes and types that are helpful in performing day to day operation e.g. dealing with string and primitive types, database connection, IO operations.

while Framework class library contains thousands of classes used to build different types of applications and provides all the basic functionalities and services that application needs. FCL includes classes and services to support different variety of application e.g.

  • Desktop application,

  • Web application (ASP.Net, MVC, WCF),

  • Mobile application,

  • Xbox application,

  • windows services etc.

More details at What is BCL/ CL in .Net?

enter image description here

任谁 2024-07-26 13:04:23

基类库 (BCL) 是作为公共语言运行时的基本 API 的核心类集。 mscorlib.dll 中的类以及 System.dll 和 System.core.dll 中的某些类被视为 BCL 的一部分。 它包括 System 、 System.Diagnostics 、 System.Globalization 、 System.Resources 、 System.Text 、 System.Runtime.Serialization 和 System.Data 等命名空间中的类。

框架类库 (FCL) 是 BCL 类的超集并引用 .NET Framework 附带的整个类库。 它包括一组扩展的库,其中包括 Windows Forms、ADO.NET、ASP.NET、语言集成查询、Windows Presentation Foundation、Windows Communication Foundation 等。

因此存在差异,您不能互换使用它们。

The Base Class Library (BCL) is the core set of classes that serve as the basic API of the Common Language Runtime. The classes in mscorlib.dll and some of the classes in System.dll and System.core.dll are considered to be a part of the BCL. It includes the classes in namespaces like System , System.Diagnostics , System.Globalization, System.Resources , System.Text , System.Runtime.Serialization and System.Data etc.

The Framework Class Library (FCL) is a superset of the BCL classes and refers to the entire class library that ships with .NET Framework. It includes an expanded set of libraries, including Windows Forms, ADO.NET, ASP.NET, Language Integrated Query, Windows Presentation Foundation, Windows Communication Foundation among others.

So there are differences and you must not use those interchangeably.

樱花落人离去 2024-07-26 13:04:23

BCL 是 FCL 的子集。 BCL 遵守公共语言基础设施的 ECMA 规范。 然后微软添加了他们所有的优点,比如数据和 xml,并将其称为框架类库。 基本上,他们拿走了 BCL,并使其达到 11 点!

The BCL is a subset of the FCL. BCL honors the ECMA specification for the common language infrastructure. Then Microsoft added all their goodness like data and xml and called it the Framework Class Library. Basically they took the BCL and made it go to 11!

相思故 2024-07-26 13:04:23

以下内容引用自《C#玩家指南》一书。

BCL 包含所有内置类型、数组、异常、数学库、基本文件 I/O、安全性、
集合、反射、网络、字符串操作、线程等等。 虽然不是完美的
指南中,一般规则是任何以 System 开头的命名空间都是 BCL 的一部分。

除了 BCL 之外,Microsoft 还随 .NET Framework 提供了更多的类。 在
一般来说,这些附加内容涵盖广泛的功能领域,例如数据库访问或图形
用户界面(Windows 窗体或 WPF)。 整个集合,包括 BCL,被称为
框架类库,或 FCL。 在随意讨论中,有时人们会使用FCL和BCL
可以互换,这并不严格正确,但对于大多数事情来说可能已经足够了。

The following is cited from the book "The C# Player's Guide".

The BCL contains all of the built-in types, arrays, exceptions, math libraries, basic File I/O, security,
collections, reflection, networking, string manipulation, threading, and more. While not a perfect
guide, a general rule is that any namespace that start with System is a part of the BCL.

Beyond the BCL, there are many more classes that Microsoft ships with the .NET Framework. In
general, these additional things cover broad functional areas, such as database access or graphical
user interfaces (Windows Forms or WPF). This entire collection, including the BCL, is called the
Framework Class Library, or FCL. In casual discussion, sometimes people use FCL and BCL
interchangeably, which isn’t strictly correct, but it is perhaps good enough for most things.

撞了怀 2024-07-26 13:04:23

从 .Net Core 的第一个版本开始,我们不能将其命名为 FCL,但可以将其命名为 CoreFX。 最近,它已经不再是 CoreFX 了。 我看到它被称为 “Core .NET Libraries”

此外,当我们浏览他们的 GitHub 库时,我们发现它们已经无法访问了。

所以,我知道上面提到的所有图书馆(在旧答案中)都在 BCL 的屋顶下。

至少,当我阅读以下摘录自 C# 的引文时,这一切都是如此12 简而言之作者:Joseph Albahari

基类库

CLR 始终附带一组称为基类的程序集
图书馆(BCL)。 BCL 为程序员提供核心功能,例如
作为集合、输入/输出、文本处理、XML/JSON 处理、
网络、加密、互操作、并发和并行
编程。

BCL 还实现了 C# 语言本身所需的类型(例如
枚举、查询和异步等功能)并让您
显式访问 CLR 的功能,例如反射和内存
管理。

As of the first incarnation of .Net Core, we can't name it FCL but could call it CoreFX. Lately, it is not anymore CoreFX at all. I have seen that it is referred to as "Core .NET Libraries".

Furthermore, when we glance at their GitHub libraries, they're not accessible anymore.

So, I understand that all libraries mentioned above, which are in old answers, are under BCL's roof.

At least, it is all when I read the following quotation excerpted from C# 12 in a Nutshell by Joseph Albahari

Base Class Library

A CLR always ships with a set of assemblies called a Base Class
Library (BCL). A BCL provides core functionality to programmers, such
as collections, input/output, text processing, XML/JSON handling,
networking, encryption, interop, concurrency, and parallel
programming.

A BCL also implements types that the C# language itself requires (for
features such as enumeration, querying, and asynchrony) and lets you
explicitly access features of the CLR, such as Reflection and memory
management.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文