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

.NET Framework (current version)

Repeats a string value a specified number of times.

Namespace:   System.Data.Objects.SqlClient
Assembly:  System.Data.Entity (in System.Data.Entity.dll)

[EdmFunctionAttribute("SqlServer", "REPLICATE")]
public static string Replicate(
	string target,
	Nullable<int> count


Type: System.String

A valid string.

Type: System.Nullable<Int32>

The value that specifies how many time to repeat target.

Return Value

Type: System.String

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

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).

.NET Framework
Available since 4.0
Return to top