Vote UpVote

Repeating characters into strings in C# and Delphi (via: .net – Best way to repeat a character in C# – Stack Overflow)

The Wiert Corner – Switching back and forth between mainly Delphi and C#, sometimes it is hard to remember which idiom works best in each environment. Recently, I had to dupe a lot of tab characters for some Tab-Delimited interface to an archaic system. I remembered the Delphi idiom: use the DupeString function as about Delphi explains (yes, I know: it dupes more than just characters). In C#, these work best for me: for string use the String constructor that accepts a character and a count for StringBuilder, us the Append method that accepts a character and a count Small code sample of the first way (thanks ...
Favorite? Off-Topic? jpluimers @ 2012-06-26 07:00


Visits: 527
Votes: 1
Favorites: 0
Off-Topic: 0

Visits by Source

User Actions

Users who voted for this posting

Contact us to advertise on DelphiFeeds.com

Community Links

Torry Firebird News


Please login or register to use this functionality.
(click on this box to dismiss)