473,387 Members | 1,590 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Number of classes in the .NET Framework

I have it in my head that I saw a marketing document from Microsoft with the
total number of classes and methods in the .NET Framework. Something like
70,000 methods? I don't need precise numbers, but a rough estimate of the
number of classes and methods would be useful ....

Thanks in advance.

Mark
Nov 18 '05 #1
8 1606
why?

--
Swanand Mokashi
Microsoft Certified Solution Developer (.NET)
Microsoft Certified Application Developer (.NET)
http://www.swanandmokashi.com/
http://www.swanandmokashi.com/HomePage/WebServices/
Home of the Stock Quotes, Quote of the day and Horoscope web services
"Mark" <fi******@idonotlikejunkmail.umn.edu> wrote in message
news:OY*************@TK2MSFTNGP11.phx.gbl...
I have it in my head that I saw a marketing document from Microsoft with the total number of classes and methods in the .NET Framework. Something like
70,000 methods? I don't need precise numbers, but a rough estimate of the
number of classes and methods would be useful ....

Thanks in advance.

Mark

Nov 18 '05 #2
Thanks for your detailed reply. Perhaps .... out of curiosity? While I
don't see the number being included in the next release of trivial pursuit,
the numbers would be intellectually interesting when describing some of the
complexities of the .NET Framework to management or others ...

Do you have the answer?

Mark

"Swanand Mokashi" <swanandATswanandmokashiDOTcomNOSPAM> wrote in message
news:Oh*************@tk2msftngp13.phx.gbl...
why?

--
Swanand Mokashi
Microsoft Certified Solution Developer (.NET)
Microsoft Certified Application Developer (.NET)
http://www.swanandmokashi.com/
http://www.swanandmokashi.com/HomePage/WebServices/
Home of the Stock Quotes, Quote of the day and Horoscope web services
"Mark" <fi******@idonotlikejunkmail.umn.edu> wrote in message
news:OY*************@TK2MSFTNGP11.phx.gbl...
I have it in my head that I saw a marketing document from Microsoft with

the
total number of classes and methods in the .NET Framework. Something like 70,000 methods? I don't need precise numbers, but a rough estimate of the number of classes and methods would be useful ....

Thanks in advance.

Mark


Nov 18 '05 #3
Theres an exanple somewhere on the web (might be in the quickstart) that
demonstrates reflection by cycling through the framework classes. If you
can find it - you should be able to add a line or two to acquire a count of
the classes.

--
Regards

John Timney
Microsoft Regional Director
Microsoft MVP
"Mark" <fi******@idonotlikejunkmail.umn.edu> wrote in message
news:Os**************@TK2MSFTNGP11.phx.gbl...
Thanks for your detailed reply. Perhaps .... out of curiosity? While I
don't see the number being included in the next release of trivial pursuit, the numbers would be intellectually interesting when describing some of the complexities of the .NET Framework to management or others ...

Do you have the answer?

Mark

"Swanand Mokashi" <swanandATswanandmokashiDOTcomNOSPAM> wrote in message
news:Oh*************@tk2msftngp13.phx.gbl...
why?

--
Swanand Mokashi
Microsoft Certified Solution Developer (.NET)
Microsoft Certified Application Developer (.NET)
http://www.swanandmokashi.com/
http://www.swanandmokashi.com/HomePage/WebServices/
Home of the Stock Quotes, Quote of the day and Horoscope web services
"Mark" <fi******@idonotlikejunkmail.umn.edu> wrote in message
news:OY*************@TK2MSFTNGP11.phx.gbl...
I have it in my head that I saw a marketing document from Microsoft
with
the
total number of classes and methods in the .NET Framework. Something

like 70,000 methods? I don't need precise numbers, but a rough estimate of the number of classes and methods would be useful ....

Thanks in advance.

Mark



Nov 18 '05 #4
You could write a fairly trivial program that loaded all the .NET
assemblies, and used reflection to count up the classes and methods. I'm
too busy, or I'd do it myself for the fun of it, but it would be a good
way to introduce yourself to reflection if you've never played with it
before, and in itself would be a good demonstration of the
sophistication of the framework.

-Jason

Mark wrote:
Thanks for your detailed reply. Perhaps .... out of curiosity? While I
don't see the number being included in the next release of trivial pursuit,
the numbers would be intellectually interesting when describing some of the
complexities of the .NET Framework to management or others ...

Do you have the answer?

Mark

"Swanand Mokashi" <swanandATswanandmokashiDOTcomNOSPAM> wrote in message
news:Oh*************@tk2msftngp13.phx.gbl...
why?

--
Swanand Mokashi
Microsoft Certified Solution Developer (.NET)
Microsoft Certified Application Developer (.NET)
http://www.swanandmokashi.com/
http://www.swanandmokashi.com/HomePage/WebServices/
Home of the Stock Quotes, Quote of the day and Horoscope web services
"Mark" <fi******@idonotlikejunkmail.umn.edu> wrote in message
news:OY*************@TK2MSFTNGP11.phx.gbl...
I have it in my head that I saw a marketing document from Microsoft with


the
total number of classes and methods in the .NET Framework. Something
like
70,000 methods? I don't need precise numbers, but a rough estimate of
the
number of classes and methods would be useful ....

Thanks in advance.

Mark



Nov 18 '05 #5
Great idea. I looked at the quickstart example John refered to in this
thread. I pasted it below. The only problem I'm seeing with reflection is
that you need to know the names of all the dlls. OR, is there a list of
these someplace?

Thanks again.

Mark

"Jason DeFontes" <ja***@defontes.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
You could write a fairly trivial program that loaded all the .NET
assemblies, and used reflection to count up the classes and methods. I'm
too busy, or I'd do it myself for the fun of it, but it would be a good
way to introduce yourself to reflection if you've never played with it
before, and in itself would be a good demonstration of the
sophistication of the framework.

-Jason

Mark wrote:
Thanks for your detailed reply. Perhaps .... out of curiosity? While I
don't see the number being included in the next release of trivial pursuit, the numbers would be intellectually interesting when describing some of the complexities of the .NET Framework to management or others ...

Do you have the answer?

Mark

"Swanand Mokashi" <swanandATswanandmokashiDOTcomNOSPAM> wrote in message
news:Oh*************@tk2msftngp13.phx.gbl...
why?

--
Swanand Mokashi
Microsoft Certified Solution Developer (.NET)
Microsoft Certified Application Developer (.NET)
http://www.swanandmokashi.com/
http://www.swanandmokashi.com/HomePage/WebServices/
Home of the Stock Quotes, Quote of the day and Horoscope web services
"Mark" <fi******@idonotlikejunkmail.umn.edu> wrote in message
news:OY*************@TK2MSFTNGP11.phx.gbl...

I have it in my head that I saw a marketing document from Microsoft with
the

total number of classes and methods in the .NET Framework. Something


like
70,000 methods? I don't need precise numbers, but a rough estimate of


the
number of classes and methods would be useful ....

Thanks in advance.

Mark


Nov 18 '05 #6
Drat - forgot to indluce the sample code I promised found at
http://samples.gotdotnet.com/quickstart/howto/ (click on reflection on the
left):

// don't forget your using statements
using System;
using System.Reflection;
// ...

// Getting an Assembly, method 1. Get the mscorlib assembly
// Note that other types such as String, or Int32 would have worked just as
well,
// since they reside in the same assembly
Assembly a = typeof(Object).Module.Assembly;

// Getting an Assembly, method 2. Load a particular assembly, using a
reference to a
// module that is within that assembly. Note that this requires a compiled
module for
// the reference, and when running in an aspx page, will require a fully
qualifed path
// to the file, to ensure it is correctly identified
Assembly b = Assembly.LoadFrom ("GetTypes.exe");

// note that either of the above methods is viable, depending on the
information
// you have. Since we know the name of the file which houses all of the base
system
// objects, we could do the following to replace the first example, just as
effectively
// (the absolute path may change on your machine)
// Assembly a = Assembly.LoadFrom
// ("c:/winserv/microsoft.net/framework/v1.0.2230/mscorlib.dll");

"Mark" <fi******@idonotlikejunkmail.umn.edu> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
Great idea. I looked at the quickstart example John refered to in this
thread. I pasted it below. The only problem I'm seeing with reflection is that you need to know the names of all the dlls. OR, is there a list of
these someplace?

Thanks again.

Mark

"Jason DeFontes" <ja***@defontes.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
You could write a fairly trivial program that loaded all the .NET
assemblies, and used reflection to count up the classes and methods. I'm
too busy, or I'd do it myself for the fun of it, but it would be a good
way to introduce yourself to reflection if you've never played with it
before, and in itself would be a good demonstration of the
sophistication of the framework.

-Jason

Mark wrote:
Thanks for your detailed reply. Perhaps .... out of curiosity? While I don't see the number being included in the next release of trivial pursuit, the numbers would be intellectually interesting when describing some of
the
complexities of the .NET Framework to management or others ...

Do you have the answer?

Mark

"Swanand Mokashi" <swanandATswanandmokashiDOTcomNOSPAM> wrote in
message news:Oh*************@tk2msftngp13.phx.gbl...

>why?
>
>--
>Swanand Mokashi
>Microsoft Certified Solution Developer (.NET)
>Microsoft Certified Application Developer (.NET)
>http://www.swanandmokashi.com/
>http://www.swanandmokashi.com/HomePage/WebServices/
>Home of the Stock Quotes, Quote of the day and Horoscope web services
>"Mark" <fi******@idonotlikejunkmail.umn.edu> wrote in message
>news:OY*************@TK2MSFTNGP11.phx.gbl...
>
>>I have it in my head that I saw a marketing document from Microsoft

with>
>the
>
>>total number of classes and methods in the .NET Framework. Something

like

>>70,000 methods? I don't need precise numbers, but a rough estimate of
the

>>number of classes and methods would be useful ....
>>
>>Thanks in advance.
>>
>>Mark
>>
>>
>
>


Nov 18 '05 #7
Yeah, I was afraid you were going to ask that. You can just figure out
the list manually by using gacutil, or looking at the dlls in the
framework install directory. That's no fun of course, and what you'd
really like to be able to do is get at that programatically, which
appears to be possible, but undocumented, and certainly is progressing a
bit beyond the trivial:

http://support.microsoft.com/default...b;en-us;317540

I found that link here, which is a nice overview of the GAC:

http://www.codeproject.com/dotnet/DemystifyGAC.asp

-Jason

Mark wrote:
Great idea. I looked at the quickstart example John refered to in this
thread. I pasted it below. The only problem I'm seeing with reflection is
that you need to know the names of all the dlls. OR, is there a list of
these someplace?

Thanks again.

Mark

"Jason DeFontes" <ja***@defontes.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
You could write a fairly trivial program that loaded all the .NET
assemblies, and used reflection to count up the classes and methods. I'm
too busy, or I'd do it myself for the fun of it, but it would be a good
way to introduce yourself to reflection if you've never played with it
before, and in itself would be a good demonstration of the
sophistication of the framework.

-Jason

Mark wrote:

Thanks for your detailed reply. Perhaps .... out of curiosity? While I
don't see the number being included in the next release of trivial
pursuit,
the numbers would be intellectually interesting when describing some of
the
complexities of the .NET Framework to management or others ...

Do you have the answer?

Mark

"Swanand Mokashi" <swanandATswanandmokashiDOTcomNOSPAM> wrote in message
news:Oh*************@tk2msftngp13.phx.gbl...
why?

--
Swanand Mokashi
Microsoft Certified Solution Developer (.NET)
Microsoft Certified Application Developer (.NET)
http://www.swanandmokashi.com/
http://www.swanandmokashi.com/HomePage/WebServices/
Home of the Stock Quotes, Quote of the day and Horoscope web services
"Mark" <fi******@idonotlikejunkmail.umn.edu> wrote in message
news:OY*************@TK2MSFTNGP11.phx.gbl...
>I have it in my head that I saw a marketing document from Microsoft
with
the
>total number of classes and methods in the .NET Framework. Something

like
>70,000 methods? I don't need precise numbers, but a rough estimate of

the
>number of classes and methods would be useful ....
>
>Thanks in advance.
>
>Mark
>
>


Nov 18 '05 #8
Cool - I went through all the System namespaces and found:

Class count: 4760
Method count: 119656

The code is below. Anything I'm messing up here? Thanks again.

//***** To run this code, throw it in the button click event on a WinForm
and put a textbox on the form titled "txtOutput" *****

int intClassCount = 0;
int intMethodCount = 0;
StringBuilder sb = new StringBuilder();

string[] Ass = new string[21];
Ass[0] = "System.Configuration.Install.dll";
Ass[1] = "System.Data.dll";
Ass[2] = "System.Data.OracleClient.dll";
Ass[3] = "System.Design.dll";
Ass[4] = "System.DirectoryServices.dll";
Ass[5] = "System.dll";
Ass[6] = "System.Drawing.Design.dll";
Ass[7] = "System.EnterpriseServices.dll";
//System.EnterpriseServices.Thunk.dll
//Ass[8] = "System.EnterpriseServices.Thunk.dll"; //It coudn't find this
one.
Ass[8] = string.Empty;
Ass[9] = "System.Management.dll";
Ass[10] = "System.Messaging.dll";
Ass[11] = "System.Runtime.Remoting.dll";
Ass[12] = "System.Runtime.Serialization.Formatters.Soap.dll" ;
Ass[13] = "System.Security.dll";
Ass[14] = "System.ServiceProcess.dll";
Ass[15] = "System.Web.dll";
Ass[16] = "System.Web.Mobile.dll";
Ass[17] = "System.Web.RegularExpressions.dll";
Ass[18] = "System.Web.Services.dll";
Ass[19] = "System.Windows.Forms.dll";
Ass[20] = "System.XML.dll";
for(int intAssemblyCount = 0; intAssemblyCount < Ass.Length;
intAssemblyCount ++)
{
if (Ass[intAssemblyCount] != string.Empty)
{
Assembly a = Assembly.LoadFrom
(@"C:\WINNT\Microsoft.NET\Framework\v1.1.4322\" +
Ass[intAssemblyCount]);

//int intPropertyCount = 0;

Module[] mod = a.GetModules();
sb.Append(Environment.NewLine +"Assembly FullName: " + a.FullName);

for (int i = 0; i < mod.Length; i++)
{
Module m = mod[i];
sb.Append(Environment.NewLine + "FullyQualifiedName: " +
m.FullyQualifiedName);
sb.Append(Environment.NewLine + "Name: " + m.Name);
}

Type [] types = a.GetTypes ();
foreach (Type t in types)
{
if ( t.IsClass)
{
intClassCount++;
sb.Append(Environment.NewLine + "Class.Name: " + t.Name);

MethodInfo[] methods = t.GetMethods();

for (int i = 0; i < methods.Length; i++)
{
MethodInfo mi = methods[i];
//sb.Append(Environment.NewLine + " Method Name: " + mi.Name);
intMethodCount++;
}
}
}
}
}

sb.Append(Environment.NewLine + "Class count: " +
intClassCount.ToString());
sb.Append(Environment.NewLine + "Method count: " +
intMethodCount.ToString());

txtOutput.Text = sb.ToString();


"Jason DeFontes" <ja***@defontes.com> wrote in message
news:uh*************@TK2MSFTNGP11.phx.gbl...
Yeah, I was afraid you were going to ask that. You can just figure out
the list manually by using gacutil, or looking at the dlls in the
framework install directory. That's no fun of course, and what you'd
really like to be able to do is get at that programatically, which
appears to be possible, but undocumented, and certainly is progressing a
bit beyond the trivial:

http://support.microsoft.com/default...b;en-us;317540

I found that link here, which is a nice overview of the GAC:

http://www.codeproject.com/dotnet/DemystifyGAC.asp

-Jason

Mark wrote:
Great idea. I looked at the quickstart example John refered to in this
thread. I pasted it below. The only problem I'm seeing with reflection is that you need to know the names of all the dlls. OR, is there a list of
these someplace?

Thanks again.

Mark

"Jason DeFontes" <ja***@defontes.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
You could write a fairly trivial program that loaded all the .NET
assemblies, and used reflection to count up the classes and methods. I'm
too busy, or I'd do it myself for the fun of it, but it would be a good
way to introduce yourself to reflection if you've never played with it
before, and in itself would be a good demonstration of the
sophistication of the framework.

-Jason

Mark wrote:
Thanks for your detailed reply. Perhaps .... out of curiosity? While Idon't see the number being included in the next release of trivial


pursuit,
the numbers would be intellectually interesting when describing some of


the
complexities of the .NET Framework to management or others ...

Do you have the answer?

Mark

"Swanand Mokashi" <swanandATswanandmokashiDOTcomNOSPAM> wrote in messagenews:Oh*************@tk2msftngp13.phx.gbl...
>why?
>
>--
>Swanand Mokashi
>Microsoft Certified Solution Developer (.NET)
>Microsoft Certified Application Developer (.NET)
>http://www.swanandmokashi.com/
>http://www.swanandmokashi.com/HomePage/WebServices/
>Home of the Stock Quotes, Quote of the day and Horoscope web services
>"Mark" <fi******@idonotlikejunkmail.umn.edu> wrote in message
>news:OY*************@TK2MSFTNGP11.phx.gbl...
>
>
>>I have it in my head that I saw a marketing document from Microsoft


with
>the
>
>
>>total number of classes and methods in the .NET Framework. Something

like
>>70,000 methods? I don't need precise numbers, but a rough estimate of
the
>>number of classes and methods would be useful ....
>>
>>Thanks in advance.
>>
>>Mark
>>
>>
>
>


Nov 18 '05 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: genc ymeri | last post by:
Hi, I'm really in the middle of the crossroad over here. My app recieves an XML files and process it. This XML file contain some data and relationships which are based on bussiness rules. My app...
2
by: Mark | last post by:
I have it in my head that I saw a marketing document from Microsoft with the total number of classes and methods in the .NET Framework. Something like 70,000 methods? I don't need precise numbers,...
5
by: Kamaluokeakua | last post by:
I have to write an application that deals with clients in multiple countries. The addresses, phone numbers, country id and currency information has to be stored into a database that allows for the...
10
by: ptass | last post by:
Hi In asp.net 2.0 an aspx files .cs file is a partial class and all works fine, however, I thought I’d be able to create another class file, call it a partial class and have that compile and...
1
by: Sarge | last post by:
Hi all, tough question. Apologies for the cross posting but it is an interesting architectural problem and I think deserves a wide audience. What is the best way to extend web service proxy...
13
by: andrea | last post by:
Sorry for the stupid question, I know, but sometimes is necessary starts from the basic. I don't know how to pass the result of a method generated from a DAL class to a BL class returning the...
9
by: Ryan | last post by:
Hi all, I'm playing with Lutz Roeders Reflector and have found several areas where I think there are issues in the framework libraries. I can't see how the following should work as expected and...
5
by: John | last post by:
Which variable type (c#) can whole the largest whole number? I know this sounds silly but as double and decimal are made for numbers with decimals I am not sure. Also if anybody knows of any...
6
by: sam | last post by:
Hi, The .net framework contains a lot of classes and I am looking for a map of framework classes in jpg or pdf format to get a quick viesw of framework classes. Does anyone knows if this...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.