Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Knowing if a property exists
Message
De
03/03/2011 09:05:30
 
 
À
03/03/2011 03:49:32
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:
01502492
Vues:
43
>Does the property have a public accessor. Docs:
>"A property is considered public to reflection if it has at least one accessor that is public." For clarity if should read:
>"A property is only considered public to reflection if it has at least one accessor that is public."
>For the following class GetProperties() would only return PropertyA, GetMembers() would return PropertyA and PropertyB:
Public Class SomeClass
>    Public PropertyB As String
>    Dim _propertyA As String
>    Public Property PropertyA As String
>        Get
>            Return _propertyA
>        End Get
>        Set(ByVal value As String)
>            _propertyA = value
>        End Set
>    End Property
>End Class
Thanks, that is what I started to suspect last night.

Would there be a way to verify for PropertyB, in your example, and get its value if it exists?
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform