EdmFunctions.IndexOf(DbExpression, DbExpression) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
建立會使用指定引數叫用標準 'IndexOf' 函式的 DbFunctionExpression,其中的引數都必須具有字串結果型別。 運算式的結果類型為 Edm.Int32。
public:
[System::Runtime::CompilerServices::Extension]
static System::Data::Common::CommandTrees::DbFunctionExpression ^ IndexOf(System::Data::Common::CommandTrees::DbExpression ^ searchString, System::Data::Common::CommandTrees::DbExpression ^ stringToFind);
public static System.Data.Common.CommandTrees.DbFunctionExpression IndexOf (this System.Data.Common.CommandTrees.DbExpression searchString, System.Data.Common.CommandTrees.DbExpression stringToFind);
static member IndexOf : System.Data.Common.CommandTrees.DbExpression * System.Data.Common.CommandTrees.DbExpression -> System.Data.Common.CommandTrees.DbFunctionExpression
<Extension()>
Public Function IndexOf (searchString As DbExpression, stringToFind As DbExpression) As DbFunctionExpression
參數
- searchString
- DbExpression
表達式,指定要搜尋的 stringToFind字串。
- stringToFind
- DbExpression
表達式,指定要在其中尋找 searchString 的字串應該檢查。
傳回
傳回 中searchString第一個索引stringToFind的新 DbFunctionExpression。
例外狀況
searchString 或 stringToFind 為 null。
searchString 或 stringToFind 無效。
備註
IndexOf 所傳回的索引是以 <b>1 為基礎</b>。