ITextSearchService.FindNext 方法
搜尋下一個出現的搜尋字串。
命名空間: Microsoft.VisualStudio.Text.Operations
組件: Microsoft.VisualStudio.Text.Logic (在 Microsoft.VisualStudio.Text.Logic.dll 中)
語法
'宣告
Function FindNext ( _
startIndex As Integer, _
wraparound As Boolean, _
findData As FindData _
) As Nullable(Of SnapshotSpan)
Nullable<SnapshotSpan> FindNext(
int startIndex,
bool wraparound,
FindData findData
)
Nullable<SnapshotSpan> FindNext(
int startIndex,
bool wraparound,
FindData findData
)
abstract FindNext :
startIndex:int *
wraparound:bool *
findData:FindData -> Nullable<SnapshotSpan>
function FindNext(
startIndex : int,
wraparound : boolean,
findData : FindData
) : Nullable<SnapshotSpan>
參數
startIndex
類型:Int32要開始搜尋的索引。
wraparound
類型:Boolean決定搜尋是否在到達緩衝區的結尾時從緩衝區的開頭重新搜尋。
findData
類型:Microsoft.VisualStudio.Text.Operations.FindData要用於這個搜尋的資料。
傳回值
類型:Nullable<SnapshotSpan>
SnapshotSpan 包含符合項目,如果找不到相符的項目,或nullnull 參考 (即 Visual Basic 中的 Nothing)如果找不到相符的項目。
例外狀況
例外狀況 | 條件 |
---|---|
ArgumentNullException | findData 為 nullnull 參考 (即 Visual Basic 中的 Nothing)。 |
ArgumentOutOfRangeException | startIndex小於零或大於資料的長度。 |
ArgumentException | UseRegularExpressions旗標已設定,並搜尋字串是無效的規則運算式。 |
.NET Framework 安全性
- 完全信任立即呼叫者。這個成員無法供部分信任的程式碼使用。如需詳細資訊,請參閱從部分受信任程式碼使用程式庫。