共用方式為


SqlFunctions.Replicate(String, Nullable<Int32>) 方法

定義

將字串值重複指定的次數。

public:
 static System::String ^ Replicate(System::String ^ target, Nullable<int> count);
[System.Data.Objects.DataClasses.EdmFunction("SqlServer", "REPLICATE")]
public static string Replicate(string target, int? count);
[<System.Data.Objects.DataClasses.EdmFunction("SqlServer", "REPLICATE")>]
static member Replicate : string * Nullable<int> -> string
Public Shared Function Replicate (target As String, count As Nullable(Of Integer)) As String

參數

target
String

有效的字串。

count
Nullable<Int32>

指定要重複 target 次數的值。

傳回

目標字串,依據 count 所指定而重複數次。

屬性

備註

您無法直接呼叫此函式。 此函式只能出現在 LINQ to Entities 查詢中。

此函式會轉譯為資料庫中的對應函式。 如需對應 SQL Server 函式的相關信息,請參閱 REPLICATION (Transact-SQL)

適用於