FileStreamExtensionsIndexOf(FileStream, Byte, Int64, Int64) Method

Searches for the specified byte pattern within the source FileStream, and returns the zero-based index of the first occurrence.

Definition

Namespace: DevCase.Extensions.FileStreamExtensions
Assembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[EditorBrowsableAttribute(EditorBrowsableState.Always)]
public static long IndexOf(
	this FileStream stream,
	byte[] pattern,
	long startPosition,
	long count
)

Parameters

stream  FileStream
The source FileStream.
pattern  Byte

[Missing <param name="pattern"/> documentation for "M:DevCase.Extensions.FileStreamExtensions.FileStreamExtensions.IndexOf(System.IO.FileStream,System.Byte[],System.Int64,System.Int64)"]

startPosition  Int64
The zero-based starting position in the source FileStream to perform the search.
count  Int64
The number of bytes in the source FileStream to search.

Return Value

Int64
The zero-based index of the first occurrence of the specified byte pattern within the source FileStream, if found; otherwise, –1.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type FileStream. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

Example

This is a code example.
C#
No code example is currently available or this language may not be supported.

See Also