共用方式為


SqlHierarchyId.IsDescendantOf 方法

Gets a value indicating whether the SqlHierarchyId node is the descendant of the parent.

命名空間:  Microsoft.SqlServer.Types
組件:  Microsoft.SqlServer.Types (在 Microsoft.SqlServer.Types.dll 中)

語法

'宣告
<SqlMethodAttribute(DataAccess := DataAccessKind.None, SystemDataAccess := SystemDataAccessKind.None,  _
    InvokeIfReceiverIsNull := False, OnNullCall := False,  _
    IsDeterministic := True, IsPrecise := True, IsMutator := False)> _
Public Function IsDescendantOf ( _
    parent As SqlHierarchyId _
) As SqlBoolean
'用途
Dim instance As SqlHierarchyId 
Dim parent As SqlHierarchyId 
Dim returnValue As SqlBoolean 

returnValue = instance.IsDescendantOf(parent)
[SqlMethodAttribute(DataAccess = DataAccessKind.None, SystemDataAccess = SystemDataAccessKind.None, 
    InvokeIfReceiverIsNull = false, OnNullCall = false, 
    IsDeterministic = true, IsPrecise = true, IsMutator = false)]
public SqlBoolean IsDescendantOf(
    SqlHierarchyId parent
)
[SqlMethodAttribute(DataAccess = DataAccessKind::None, SystemDataAccess = SystemDataAccessKind::None, 
    InvokeIfReceiverIsNull = false, OnNullCall = false, 
    IsDeterministic = true, IsPrecise = true, IsMutator = false)]
public:
SqlBoolean IsDescendantOf(
    SqlHierarchyId parent
)
[<SqlMethodAttribute(DataAccess = DataAccessKind.None, SystemDataAccess = SystemDataAccessKind.None, 
    InvokeIfReceiverIsNull = false, OnNullCall = false, 
    IsDeterministic = true, IsPrecise = true, IsMutator = false)>]
member IsDescendantOf : 
        parent:SqlHierarchyId -> SqlBoolean
public function IsDescendantOf(
    parent : SqlHierarchyId
) : SqlBoolean

參數

傳回值

型別:System.Data.SqlTypes.SqlBoolean
Boolean , true (1) for all the nodes in the sub-tree rooted at parent; false (0) for all other nodes.

備註

parent is considered its own descendant.

請參閱

參考

SqlHierarchyId 結構

Microsoft.SqlServer.Types 命名空間