I have the following code from VBA:
String$(254, 0)
and want to convert it into code that will work in VB2008.
Can anyone help?
Thanks.
Private Function FillString(ByVal Count As Integer, ByVal Character As Char)
As String
Dim RetVal As String = ""
For I As Integer = 1 To Count
RetVal += Character
Next
Return RetVal
End Function
Less than 2 minutes.
Dick
--
Richard Grier, MVP
Hard & Software
Author of Visual Basic Programmer's Guide to Serial Communications, Fourth
Edition,
ISBN 1-890422-28-2 (391 pages, includes CD-ROM). July 2004, Revised March
2006.
See www.hardandsoftware.net for details and contact information.
You can use:
Dim s as String = StrDup(254, Chr(0))
It works in VB2005. However, you should direct VB.Net questions to microsoft.public.dotnet.languages.vb.
--
Al Reid