Click or drag to resize

StringExtensionsRepeat Method (String, Int32, String)

Repeats the specified string a number of times, each instance separated by the separator string

Namespace:  TestHelperExtensions
Assembly:  CBI.TestHelperExtensions (in CBI.TestHelperExtensions.dll) Version: 2.1.0.1
Syntax
public static string Repeat(
	this string value,
	int numberOfRepetitions,
	string separator
)

Parameters

value
Type: SystemString
The string to be repeated
numberOfRepetitions
Type: SystemInt32
The number of times to repeat the string
separator
Type: SystemString
The string to be placed in between instances of the original value in the output

Return Value

Type: String
A string that represents the original string repeated the proper number of times, separated by the separator string

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type String. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also