Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Name of the attribute, NOT value of the attribute.
Message
 
To
02/04/2007 18:26:55
Alan Hoiland
Canadian Natural Resources Ltd.
Calgary, Alberta, Canada
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Miscellaneous
Thread ID:
01211507
Message ID:
01211892
Views:
13
Alan,

>I need to pass the name of my attributes to a function.
>By attribute I mean all the fields of the Entity Class
>
>I have tried the following, but that returns the value of the property.
>me.oMainBizObj.Entity.ACCOUNT_TYPE_ID.ToString
>
>I'd like to obtain "ACCOUNT_TYPE_ID" as the result. What's the way to obtain this from the entity class.

What you need here is to use reflection on the entity object.

For example, in C#:
typeof(EmployeeEntity).GetProperties();
And in VB .NET:
GetType(CustomerEntity).GetProperties()
Best Regards,
Kevin McNeish
Eight-Time .NET MVP
VFP and iOS Author, Speaker & Trainer
Oak Leaf Enterprises, Inc.
Chief Architect, MM Framework
http://www.oakleafsd.com
Previous
Reply
Map
View

Click here to load this message in the networking platform