Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Testing for NULL objects
Message
De
21/03/2007 12:21:30
 
 
À
21/03/2007 08:00:17
Alexandre Palma
Harms Software, Inc.
Alverca, Portugal
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Divers
Thread ID:
01206415
Message ID:
01206629
Vues:
25
>> Gary you should do
Function GetHierarchy(ByVal toObject As Object)
Dim lcHierarchy As String
Dim loObject As Object
loObject = toObject
lcHierarchy = loObject.Name

Do While Not loObject.Parent is Nothing 
    loObject = loObject.Parent
    lcHierarchy = loObject.Name & "." & lcHierarchy
Loop
Return lcHierarchy
End Function
Thanks Alexandre!

I now know that IsNothing(loObject.Parent) also works!


Gary.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform