EdmFunctions.IndexOf(DbExpression, DbExpression) 方法

定義

建立會使用指定引數叫用標準 '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。

例外狀況

searchStringstringToFindnull

searchStringstringToFind 無效。

備註

IndexOf 所傳回的索引是以 <b>1 為基礎</b>。

適用於