Home All Groups Group Topic Archive Search About

vb6 to vb.net migration

Author
29 Sep 2006 6:58 PM
bartj1
Hello,
I am a vb (classic vb5/vb6) programmer who is getting his feet wet with
..net.

I have been attempting to use various old vb functions and tweek them
as required to get thme to run under .net. In many cases I was
pleasently surprised by how easy it was, and in other cases I have had
to do searches on the net as the local help is nearly worthless(too
much information that I dont need).

Can anyone recommend a place on the web where there is a good table of
equlivent(vb > .net) translations?

At presently I am looking to find a translation for the FUNCTON
"String" which takes 2 arguments to create a string with X occurances
of Y: Old VB = String(5,"A") . This returns a string of "AAAAA".
All web searches to date either take me down the path of -string as
varibale- or -string as an object- to be parsed.

Comments?
Thanks
bartj

Author
29 Sep 2006 7:04 PM
GhostInAK
Hello bar***@gmail.com,

String (As your 'useless' MSDN documentation points out) as objects.. Objects
have ctors.. 
An abundance of information is NEVER a Bad Thing.

Dim tString as String = New String("A", 5)

-Boo

Show quoteHide quote
> Hello,
> I am a vb (classic vb5/vb6) programmer who is getting his feet wet
> with
> .net.
> I have been attempting to use various old vb functions and tweek them
> as required to get thme to run under .net. In many cases I was
> pleasently surprised by how easy it was, and in other cases I have had
> to do searches on the net as the local help is nearly worthless(too
> much information that I dont need).
>
> Can anyone recommend a place on the web where there is a good table of
> equlivent(vb > .net) translations?
>
> At presently I am looking to find a translation for the FUNCTON
> "String" which takes 2 arguments to create a string with X occurances
> of Y: Old VB = String(5,"A") . This returns a string of "AAAAA".
> All web searches to date either take me down the path of -string as
> varibale- or -string as an object- to be parsed.
> Comments?
> Thanks
> bartj
Author
29 Sep 2006 8:05 PM
bartj1
Thanks for the resposne...

Your code works. Understand that I need to get with the object way of
doing things...just a little un-natural at this point, but its sure to
get better...again...thanks!

bartj



GhostInAK wrote:
Show quoteHide quote
> Hello bar***@gmail.com,
>
> String (As your 'useless' MSDN documentation points out) as objects.. Objects
> have ctors..
> An abundance of information is NEVER a Bad Thing.
>
> Dim tString as String = New String("A", 5)
>
> -Boo
>
> > Hello,
> > I am a vb (classic vb5/vb6) programmer who is getting his feet wet
> > with
> > .net.
> > I have been attempting to use various old vb functions and tweek them
> > as required to get thme to run under .net. In many cases I was
> > pleasently surprised by how easy it was, and in other cases I have had
> > to do searches on the net as the local help is nearly worthless(too
> > much information that I dont need).
> >
> > Can anyone recommend a place on the web where there is a good table of
> > equlivent(vb > .net) translations?
> >
> > At presently I am looking to find a translation for the FUNCTON
> > "String" which takes 2 arguments to create a string with X occurances
> > of Y: Old VB = String(5,"A") . This returns a string of "AAAAA".
> > All web searches to date either take me down the path of -string as
> > varibale- or -string as an object- to be parsed.
> > Comments?
> > Thanks
> > bartj
Author
29 Sep 2006 8:07 PM
Izzy
OR

Dim tString as New String("A", 5)

Which is the same thing.

Israel

GhostInAK wrote:
Show quoteHide quote
> Hello bar***@gmail.com,
>
> String (As your 'useless' MSDN documentation points out) as objects.. Objects
> have ctors..
> An abundance of information is NEVER a Bad Thing.
>
> Dim tString as String = New String("A", 5)
>
> -Boo
>
> > Hello,
> > I am a vb (classic vb5/vb6) programmer who is getting his feet wet
> > with
> > .net.
> > I have been attempting to use various old vb functions and tweek them
> > as required to get thme to run under .net. In many cases I was
> > pleasently surprised by how easy it was, and in other cases I have had
> > to do searches on the net as the local help is nearly worthless(too
> > much information that I dont need).
> >
> > Can anyone recommend a place on the web where there is a good table of
> > equlivent(vb > .net) translations?
> >
> > At presently I am looking to find a translation for the FUNCTON
> > "String" which takes 2 arguments to create a string with X occurances
> > of Y: Old VB = String(5,"A") . This returns a string of "AAAAA".
> > All web searches to date either take me down the path of -string as
> > varibale- or -string as an object- to be parsed.
> > Comments?
> > Thanks
> > bartj
Author
29 Sep 2006 8:40 PM
GhostInAK
Hello Izzy,

Yes.. But I tend to view ctors (especially parameterized ctors) as object
initializers.. so I like to make the distinction between object instantiation
and object initialization.

-Boo

Show quoteHide quote
> OR
>
> Dim tString as New String("A", 5)
>
> Which is the same thing.
>
> Israel
>
> GhostInAK wrote:
>
>> Hello bar***@gmail.com,
>>
>> String (As your 'useless' MSDN documentation points out) as objects..
>> Objects
>> have ctors..
>> An abundance of information is NEVER a Bad Thing.
>> Dim tString as String = New String("A", 5)
>>
>> -Boo
>>
>>> Hello,
>>> I am a vb (classic vb5/vb6) programmer who is getting his feet wet
>>> with
>>> .net.
>>> I have been attempting to use various old vb functions and tweek
>>> them
>>> as required to get thme to run under .net. In many cases I was
>>> pleasently surprised by how easy it was, and in other cases I have
>>> had
>>> to do searches on the net as the local help is nearly worthless(too
>>> much information that I dont need).
>>> Can anyone recommend a place on the web where there is a good table
>>> of equlivent(vb > .net) translations?
>>>
>>> At presently I am looking to find a translation for the FUNCTON
>>> "String" which takes 2 arguments to create a string with X
>>> occurances
>>> of Y: Old VB = String(5,"A") . This returns a string of "AAAAA".
>>> All web searches to date either take me down the path of -string as
>>> varibale- or -string as an object- to be parsed.
>>> Comments?
>>> Thanks
>>> bartj
Author
29 Sep 2006 8:51 PM
Herfried K. Wagner [MVP]
<bar***@gmail.com> schrieb:
> At presently I am looking to find a translation for the FUNCTON
> "String" which takes 2 arguments to create a string with X occurances
> of Y: Old VB = String(5,"A") . This returns a string of "AAAAA".

Method 'StrDup' or the 'String' constructor.

--
M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://dotnet.mvps.org/dotnet/faqs/>
Author
2 Oct 2006 7:08 AM
Harry Strybos
<bar***@gmail.com> wrote in message
Show quoteHide quote
news:1159556321.109238.286630@i42g2000cwa.googlegroups.com...
> Hello,
> I am a vb (classic vb5/vb6) programmer who is getting his feet wet with
> .net.
>
> I have been attempting to use various old vb functions and tweek them
> as required to get thme to run under .net. In many cases I was
> pleasently surprised by how easy it was, and in other cases I have had
> to do searches on the net as the local help is nearly worthless(too
> much information that I dont need).
>
> Can anyone recommend a place on the web where there is a good table of
> equlivent(vb > .net) translations?
>
> At presently I am looking to find a translation for the FUNCTON
> "String" which takes 2 arguments to create a string with X occurances
> of Y: Old VB = String(5,"A") . This returns a string of "AAAAA".
> All web searches to date either take me down the path of -string as
> varibale- or -string as an object- to be parsed.
>
> Comments?
> Thanks
> bartj
>
I too, am still interested in "bartj1" question':

"Can anyone recommend a place on the web where there is a good table of
equlivent(vb > .net) translations?"

This would be most useful to many programmers.