 | StringExtensionsRepeat Method (String, Int32) |
Repeats the specified string a number of times
Namespace:
TestHelperExtensions
Assembly:
CBI.TestHelperExtensions (in CBI.TestHelperExtensions.dll) Version: 2.1.0.1
Syntaxpublic static string Repeat(
this string value,
int numberOfRepetitions
)
<ExtensionAttribute>
Public Shared Function Repeat (
value As String,
numberOfRepetitions As Integer
) As String
public:
[ExtensionAttribute]
static String^ Repeat(
String^ value,
int numberOfRepetitions
)
[<ExtensionAttribute>]
static member Repeat :
value : string *
numberOfRepetitions : int -> string
Parameters
- value
- Type: SystemString
The string to be repeated - numberOfRepetitions
- Type: SystemInt32
The number of times to repeat the string
Return Value
Type:
StringA string that represents the original string repeated the proper number of times
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