473,394 Members | 1,645 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,394 software developers and data experts.

All Class names

Hi,

How can i found all class names in a namespace?. My aim is reach all
attributes of classes.

Best Regards
Erkan
Nov 17 '05 #1
4 1143
have a look here at a great article on Reflection in .NET
http://www.codeproject.com/csharp/IntroReflection.asp

"Erkan KURTULUÞ" <eo********@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Hi,

How can i found all class names in a namespace?. My aim is reach all
attributes of classes.

Best Regards
Erkan

Nov 17 '05 #2
Hi,

Have you tried using reflection? You can load an assembly and get all the
information from it, including method names and types. Check the MSDN for
examples. (System.Reflection)

Cheers
Salva

"Erkan KURTULUÞ" wrote:
Hi,

How can i found all class names in a namespace?. My aim is reach all
attributes of classes.

Best Regards
Erkan

Nov 17 '05 #3
Reflection is you friend. Look up on Assembly.GetTypes()

-vj

"Erkan KURTULUÞ" <eo********@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Hi,

How can i found all class names in a namespace?. My aim is reach all
attributes of classes.

Best Regards
Erkan

Nov 17 '05 #4
The only problem is you cannot guarantee to find all the classes in a *namespace* as a namespace can span multiple assemblies.

try writing the folloing and compiling it

namespace System.Data
{
public class MyNewConnection
{
}
}

this creates a new class in the System.Data namespace.

Regards

Richard Blewett - DevelopMentor
http://www.dotnetconsult.co.uk/weblog
http://www.dotnetconsult.co.uk

Hi,

Have you tried using reflection? You can load an assembly and get all the
information from it, including method names and types. Check the MSDN for
examples. (System.Reflection)

Cheers
Salva

"Erkan KURTULU&THORN;" wrote:
Hi,

How can i found all class names in a namespace?. My aim is reach all
attributes of classes.

Best Regards
Erkan


[microsoft.public.dotnet.languages.csharp]
Nov 17 '05 #5

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

Similar topics

5
by: Mohammed Mazid | last post by:
Can anyone please tell me if there is a class that provides place names in the world? I am trying to implement a Flight system and if there was such a class then it could've contributed towards...
3
by: gry | last post by:
I often find myself wanting an instance attribute that can take on only a few fixed symbolic values. (This is less functionality than an enum, since there are no *numbers* associated with the...
8
by: Ares Lagae | last post by:
When adopting the coding style of the standard C++ library, you often run into naming problems because class names are lower case, and member functions do not have get/set prefixes. For example:...
21
by: Jon Slaughter | last post by:
I have a class that is basicaly duplicated throughout several files with only members names changing according to the class name yet with virtually the exact same coding going on. e.g. class...
5
by: meyousikmann | last post by:
Given these two (incomplete but representative) classes in two seperate header files: Class1.h class Class1 { public: Class(const char CharValue, const int IntValue1, const int IntValue2);...
6
by: Alex Hunsley | last post by:
I know that I can catch access to unknown attributes with code something like the following: class example: def __getattr__(self, name): if name == 'age': return __age else: raise...
9
by: David A. Osborn | last post by:
I have a set of classes that each have an enumeration in them, and based on dynamic input I need to access a different enumeration. For example Three classes Class_A, Class_B, and Class_C that...
6
by: alainpoint | last post by:
Hello, I have got a problem that i can't readily solve. I want the following: I want to create a supertuple that behaves both as a tuple and as a class. It should do the following:...
20
by: Shawnk | last post by:
I would like to get the class INSTANCE name (not type name) of an 'object'. I can get the object (l_obj_ref.GetType()) and then get the (l_obj_typ.Name) for the class name. I there any way of...
4
by: Steven Simpson | last post by:
Stefan Ram wrote (in "More than one language in a page"): Is this a new trend of user-agent writers (Microformats, and now Google) staking claims on the @class namespace? I'm surely not the only...
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.