Constructs and initializes a new instance of string
.
[Edit]
Parameters
- c
- A char .
[Edit]
- count
- A int containing the number of occurrences of c.
[Edit]
- count
- Documentation for this section has not yet been entered.
[Edit]
Exceptions
Remarks
Example
The following example demonstrates using this constructor.
C# Example |
using System;
public class StringExample {
public static void Main() {
string s = new String('a', 10);
Console.WriteLine(s);
}
}
|
The output is
aaaaaaaaaa
Requirements
Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0