NIndex.GetOffset(IntPtr) Method
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Calculates the offset from the start using the given collection length.
public:
IntPtr GetOffset(IntPtr length);
public IntPtr GetOffset(IntPtr length);
member this.GetOffset : nativeint -> nativeint
Public Function GetOffset (length As IntPtr) As IntPtr
- length
-
IntPtr
nativeint
The length of the collection that the NIndex will be used with. Must be a positive value.
nativeint
For performance reasons, the input length argument and the returned offset value aren't validated against negative values. Also, the returned offset might be greater than the input length. It is expected NIndex will be used with collections that always have a non-negative length/count. If the returned offset is negative and then used to NIndex a collection, an ArgumentOutOfRangeException is thrown, which has the same effect as the validation.
Produkt | Verzie |
---|---|
.NET | 8 (package-provided), 9 (package-provided), 10 (package-provided) |
Pripomienky k produktu .NET
.NET je open-source projekt. Ak chcete poskytnúť pripomienky, vyberte prepojenie: