Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Name of the attribute, NOT value of the attribute.
Message
 
À
02/04/2007 18:26:55
Alan Hoiland
Canadian Natural Resources Ltd.
Calgary, Alberta, Canada
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Divers
Thread ID:
01211507
Message ID:
01211892
Vues:
14
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform