Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Knowing if a property exists
Message
De
03/03/2011 11:15:24
 
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Versions des environnements
Environment:
VB 9.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01502282
Message ID:
01502511
Vues:
43
This seems to work:
Dim loFieldInfo As System.Reflection.FieldInfo = Nothing
Dim loMemberInfo As System.Reflection.MemberInfo() = Nothing

' Get a reference to the member
loMemberInfo = oProcess.oLabel.GetType().GetMember("c" + lcKey)

' If it exists
If loMemberInfo.Length > 0 Then

   ' Get a reference to it
   loFieldInfo = loMemberInfo(0)

   ' Get the property value
   loControlLabel.Text = loFieldInfo.GetValue(oProcess.oLabel)

End If
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform