This question was closed a long time ago. I've tried to re-open it (and flagged it for moderator attention) but my flag was rejected. It seems clear to me that the two questions under consideration are:

Is there a built-in function to repeat a char in .net?


Is there a built-in function to repeat a string in .net?

The question was closed because the other question solves how to repeat a char. As there is no canonical (non-closed) question on how to repeat a string, I feel like this question should remain open (and/or perhaps modified to include only a discussion involving repeating strings).

Or, if there already exists an answer to the string portion of this question, perhaps this question should be modified to include duplicate references to both. (I could not find an ideal candidate, or I would have done so myself)

  • Does the new String() method not work for a string, only a char? If it works for any sized string, I'd say modify the duplicated question to say string instead of char, and then it would cover both. – animuson Jan 4 '13 at 1:57
  • @animuson, the new string() constructor only repeats characters, not strings. I believe my answer is canonical for strings. – Kirk Woll Jan 4 '13 at 2:16

Some benevolent mod (or perhaps a posse of non-mods) re-opened it. (will accept in another 23 hours or so)

| improve this answer | |
  • "Post Reopened by Kirk Woll, David Robinson, Daniel Fischer, Jon Clements, Chris Gerken" Always err on the side of posses when in doubt :) – Tim Post Feb 4 '13 at 3:17
  • @Tim, heh, quite. ;) – Kirk Woll Feb 4 '13 at 4:15
  • You can click on the link to the edited versions; it has all the changes including who opened and closed questions... – ben is uǝq backwards Feb 4 '13 at 9:00
  • Thanks @ben, had been wondering how Tim provided that list. – Kirk Woll Feb 4 '13 at 14:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .