SqlFunctions.Replicate(String, Nullable<Int32>) Method

Definition

Repeats a string value a specified number of times.

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

Parameters

target
String

A valid string.

count
Nullable<Int32>

The value that specifies how many time to repeat target.

Returns

The target string, repeated the number of times specified by count.

Attributes

Remarks

You cannot call this function directly. This function can only appear within a LINQ to Entities query.

This function is translated to a corresponding function in the database. For information about the corresponding SQL Server function, see REPLICATE (Transact-SQL).

Applies to