NDepend.API Documentation
NewerVersion<T> Method (ICompareContext)
NDepend.CodeModel Namespace > ICompareContext Interface : NewerVersion<T> Method
T is a ICodeElement type.
The ICodeElement object.
Returns the newer version of the codeElement object.
Syntax
T NewerVersion<T>( 
   T codeElement
)
where T: class, ICodeElement

Parameters

codeElement
The ICodeElement object.

Type Parameters

T
T is a ICodeElement type.
Exceptions
ExceptionDescription
codeElement is not NewerCodeBase nor OlderCodeBase not a code element that belong to any of these code base.
Remarks
If codeElement is already the newer version, returns the codeElement object.
If codeElement has been removed and has no corresponding newer version, returns null.
This method has a constant time complexity.
Requirements

Target Platforms: Windows 11, 10, 8, 7 and Linux, MacOS with net8.0, net7.0 or net6.0 installed

See Also

Reference

ICompareContext Interface
ICompareContext Members
NewerVersion<T> Method