IHierarchyData.Path Propriété
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Obtient le chemin hiérarchique du nœud.
public:
property System::String ^ Path { System::String ^ get(); };
public string Path { get; }
member this.Path : string
Public ReadOnly Property Path As String
Valeur de propriété
Qui String identifie le chemin hiérarchique par rapport au nœud actuel.
Exemples
L’exemple de code suivant montre comment implémenter la Path propriété dans une classe qui implémente l’interface IHierarchyData . La FileSystemHierarchyData classe encapsule un FileSystemInfo objet et l’implémentation de propriété Path retourne son chemin d’accès au système de fichiers. Cet exemple de code fait partie d’un exemple plus large fourni pour l’interface IHierarchyData et la HierarchicalDataSourceControl classe.
// DirectoryInfo returns the OriginalPath, while FileInfo returns
// a fully qualified path.
public string Path
{
get
{
return fileSystemObject.ToString();
}
}
' DirectoryInfo returns the OriginalPath, while FileInfo returns
' a fully qualified path.
Public Overridable ReadOnly Property Path() As String _
Implements IHierarchyData.Path
Get
Return fileSystemObject.ToString()
End Get
End Property
Remarques
La Path propriété peut être transmise à la GetHierarchicalView méthode pour récupérer l’objet HierarchicalDataSourceView qui correspond au nœud identifié par Path.
Avertissement
La Path propriété ne doit contenir aucune information sensible sur l’environnement hôte, car elle peut être rendue au client dans un contrôle lié aux données.