Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Exactly how large is the .NET (3.5) Framework Class Library?

I've regularly read that the framework is just too large for one developer to have experience with every part of it. Having some actual numbers would certainly help put things in perspective.

MSDN seems to list them all but there are no actual numbers (from what I could see) and spending hours counting them is not my idea of productive time.

  • Number of Namespaces
  • Number of Classes
  • Number of Structs
  • Number of Interfaces

I realize there are also delegates, enums, events, etc, but the above types are of most interest.

Also, the number of types in the Base Class Library (BCL) as well as the size of the overall Framework Class Library (FCL) would be interesting.

This information would be useful in 2 ways:

Firstly, to get a handle on how much of the overall framework you have actually worked with and how much you still have to learn.

Secondly, many programmers from other platforms (and non-technical people) are often surprised that a programmer can spend most of their time within the ".NET Framework". Having some numbers would certainly help explain why this is not an indication of narrow skills/experience.

[Update]

Using Andrew's code (on my .NET 3.5 SP1 system) I get:

Classes: 12688
Value types: 4438
Interfaces: 1296
like image 342
Ash Avatar asked Jan 26 '10 03:01

Ash


People also ask

What is the .NET Framework base class library?

The Framework Class Library or FCL provides the system functionality in the . NET Framework as it has various classes, data types, interfaces, etc. to perform multiple functions and build different types of applications such as desktop applications, web applications, mobile applications, etc.

How many classes are in .NET Framework?

In addition to the base data types, the System namespace contains over 100 classes, ranging from classes that handle exceptions to classes that deal with core runtime concepts, such as application domains and the garbage collector.

How does .NET Framework fit?

NET Framework can be hosted by unmanaged components that load the common language runtime into their processes and initiate the execution of managed code, thereby creating a software environment that exploits both managed and unmanaged features. .

What is standard library in C#?

The standard library is intended to be the minimum set of types and members required by a conforming C# implementation. As such, it contains only those members that are explicitly required by the C# language specification. Adding namespaces. Adding types.


1 Answers

These 2 blog posts address this topic:

  • Brad Abrams: Number of Types in the .NET Framework (shows numbers across diff. framework versions)
  • Patrick Smacchia: Number of Types in the .NET Framework (uses NDepend)

Results are broken down by number of assemblies, namespaces, types, members, and other items.

like image 123
Ahmad Mageed Avatar answered Oct 11 '22 13:10

Ahmad Mageed