Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Is there equivalent for VFP's REPLICATE() in .NET?

Status
Not open for further replies.

IlyaRabyy

Programmer
Nov 9, 2010
571
US
Colleagues,
I've been working in VFP for so-o-o long! T'was wonderful RDBMS (that now all but RIP).
But - "tempora mutantur et nos mutamur in illis", and I went back to VB, this time - in .NET.
There were many built-in functions in VFP that I used quite often, one of them was REPLICATE(), e.g.

Code:
REPLICATE("*", 16)

gives you

"[tt]****************[/tt]"

Is there any equivalent in .NET to that VFP's function? Or I'll have to "roll yer own"?

TIA!

Regards,

Ilya
 
Did you try this? :)

You will find out:[tt]
Dim a As New String("*"c, 16)[/tt]


---- Andy

There is a great need for a sarcasm font.
 
It requires two lines of code, e.g.

Code:
Dim a As New String("*"c, 16)
'...
File.WriteAllText(cFullPath, a)

I was hoping to have one line only. Can't test it now, so have to ask: Would

Code:
File.WriteAllText(cFullPath, String("*",16)

do the same?

Regards,

Ilya
 
Ah! Gotta be
Code:
New String()
Right! My overlook ("mea culpa!" [blush])
Thank you, colleague!

Regards,

Ilya
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top