Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / August 2004

Tip: Looking for answers? Try searching our database.

GetProperties() problem

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Lloyd Dupont - 30 Aug 2004 06:59 GMT
I have a simple class like that:

class Foo
{
   int bar;
}

somewhere else in the code I write
Type t = typeof(Foo);
PropertyInfo[] pi = t.GetProperties(BindingFlags.INstance |
BindingFlags.NonPublic);

unfortunately the pi array I get is of length 0 ?!?!
did I miss something ?

Signature

Lloyd Dupont, Software Architect
Get Your Data Mobile
http://www.ihookdb.com

Jochen Kalmbach - 30 Aug 2004 07:04 GMT
> I have a simple class like that:
>
[quoted text clipped - 10 lines]
> unfortunately the pi array I get is of length 0 ?!?!
> did I miss something ?

No: you have no properties in your class....

(maybe try "GetFields");

Signature

Greetings
 Jochen

Lloyd Dupont - 30 Aug 2004 07:13 GMT
woaw, so quick.
yep, that was it!

> > I have a simple class like that:
> >
[quoted text clipped - 14 lines]
>
> (maybe try "GetFields");
Lloyd Dupont - 30 Aug 2004 07:12 GMT
Never mind, => GetFields()
I should sleep more!

> I have a simple class like that:
>
[quoted text clipped - 10 lines]
> unfortunately the pi array I get is of length 0 ?!?!
> did I miss something ?

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.