共用方式為


SqlHierarchyId.GetDescendant 方法

Gets the value of a descendant SqlHierarchyId node that is greater than child1 and less than child2.

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

語法

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

returnValue = instance.GetDescendant(child1, _
    child2)
[SqlMethodAttribute(DataAccess = DataAccessKind.None, SystemDataAccess = SystemDataAccessKind.None, 
    InvokeIfReceiverIsNull = false, OnNullCall = true, 
    IsDeterministic = true, IsPrecise = true, IsMutator = false)]
public SqlHierarchyId GetDescendant(
    SqlHierarchyId child1,
    SqlHierarchyId child2
)
[SqlMethodAttribute(DataAccess = DataAccessKind::None, SystemDataAccess = SystemDataAccessKind::None, 
    InvokeIfReceiverIsNull = false, OnNullCall = true, 
    IsDeterministic = true, IsPrecise = true, IsMutator = false)]
public:
SqlHierarchyId GetDescendant(
    SqlHierarchyId child1, 
    SqlHierarchyId child2
)
[<SqlMethodAttribute(DataAccess = DataAccessKind.None, SystemDataAccess = SystemDataAccessKind.None, 
    InvokeIfReceiverIsNull = false, OnNullCall = true, 
    IsDeterministic = true, IsPrecise = true, IsMutator = false)>]
member GetDescendant : 
        child1:SqlHierarchyId * 
        child2:SqlHierarchyId -> SqlHierarchyId
public function GetDescendant(
    child1 : SqlHierarchyId, 
    child2 : SqlHierarchyId
) : SqlHierarchyId

參數

傳回值

型別:Microsoft.SqlServer.Types.SqlHierarchyId
A SqlHierarchyId with a value greater than the lower bound and less than the upper bound.

備註

  • If parent is nullnull 參考 (在 Visual Basic 中為 Nothing), returns nullnull 參考 (在 Visual Basic 中為 Nothing).

  • If parent is not nullnull 參考 (在 Visual Basic 中為 Nothing), and both child1 and child2 are nullnull 參考 (在 Visual Basic 中為 Nothing), returns a descendant of parent.

  • If parent and child1 are not nullnull 參考 (在 Visual Basic 中為 Nothing), and child2 is nullnull 參考 (在 Visual Basic 中為 Nothing), returns a descendant of parent greater than child1.

  • If parent and child2 are not nullnull 參考 (在 Visual Basic 中為 Nothing) and child1 is nullnull 參考 (在 Visual Basic 中為 Nothing), returns a descendant of parent less than child2.

  • If parent, child1, and child2 are not nullnull 參考 (在 Visual Basic 中為 Nothing), returns a descendant of parent greater than child1 and less than child2.

  • An exception is raised if child1 or child2 are not nullnull 參考 (在 Visual Basic 中為 Nothing) and are not a descendant of parent.

  • If child1 >= child2, an exception is raised.

請參閱

參考

SqlHierarchyId 結構

Microsoft.SqlServer.Types 命名空間