string class : Repeat(int) method
Description
Gets a new instance of the string that have repeated the invoker string.
Syntax
stringInstance.Repeat(int numberOfTimes)
Arguments
Class | Name | Description |
int | numberOfTimes | The number of repetitions. |
Return value
Class | Description |
string | A new instance of the string that have repeated the invoker string. |
Sample code
//anyString is a instance of string type.
string repeatedString = anyString.Repeat(5);
Notes
None
Links for reference
None