Home All Groups Group Topic Archive Search About

is there a good and free tool to convert vb to c#?

Author
16 May 2006 5:22 AM
gs


Author
16 May 2006 8:08 AM
Mehfuz Hossain
check this out for converting you vb source to c# , it is based ont
#Develop libraries.

http://www.developerfusion.co.uk/utilities/convertvbtocsharp.aspx


There is a good feature in #Develop for converting your code.

Best Regards,
Mehfuz Hossain.
http://www.mehfuz.com
Author
16 May 2006 2:31 PM
gs
thx
Show quote
"Mehfuz Hossain" <meh***@gmail.com> wrote in message
news:1147766890.954449.174230@i40g2000cwc.googlegroups.com...
> check this out for converting you vb source to c# , it is based ont
> #Develop libraries.
>
> http://www.developerfusion.co.uk/utilities/convertvbtocsharp.aspx
>
>
> There is a good feature in #Develop for converting your code.
>
> Best Regards,
> Mehfuz Hossain.
> http://www.mehfuz.com
>
Author
16 May 2006 3:07 PM
gs
there is a little problem in marshal translation

From
    Public Function RegExpGetStrings(ByRef StringIn As String, ByVal patrn
As String, _
        <Out()> ByRef myMatchCnt As Integer, _
        <Out()> <MarshalAs(UnmanagedType.LPArray,
ArraySubType:=UnmanagedType.LPStr, SizeParamIndex:=2)> ByRef stringOut As
String(), _
        <Out()> <MarshalAs(UnmanagedType.LPArray, SizeParamIndex:=2)> ByRef
myMatchPos As Integer(), _
        ByRef as_msg As String) As Integer
    ...
    End Function


to:

public int RegExpGetStrings(ref string StringIn, string patrn,  [Out()]
ref int myMatchCnt,  [Out()]
[MarshalAs(UnmanagedType.LPArray, ArraySubType=UnmanagedType.LPStr,
SizeParamIndex=2)]
ref string[] stringOut,  [Out()]
[MarshalAs(UnmanagedType.LPArray, SizeParamIndex=2)]
ref int[] myMatchPos, ref string as_msg)
{
    ..........
   }


And the C# complains on [Out()] with ref; It suggestes [ in() out()]] with
ref
Show quote
"Mehfuz Hossain" <meh***@gmail.com> wrote in message
news:1147766890.954449.174230@i40g2000cwc.googlegroups.com...
> check this out for converting you vb source to c# , it is based ont
> #Develop libraries.
>
> http://www.developerfusion.co.uk/utilities/convertvbtocsharp.aspx
>
>
> There is a good feature in #Develop for converting your code.
>
> Best Regards,
> Mehfuz Hossain.
> http://www.mehfuz.com
>
Author
16 May 2006 9:46 PM
Mattias Sjögren
Use the out keyword instead of [Out] ref.


Mattias

--
Mattias Sjögren [C# MVP]  mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
Author
17 May 2006 3:50 AM
gs
thanks.  it works
Show quote
"Mattias Sjögren" <mattias.dont.want.spam@mvps.org> wrote in message
news:ulymYJTeGHA.3640@TK2MSFTNGP03.phx.gbl...
>
> Use the out keyword instead of [Out] ref.
>
>
> Mattias
>
> --
> Mattias Sjögren [C# MVP]  mattias @ mvps.org
> http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
> Please reply only to the newsgroup.
Author
17 May 2006 5:23 PM
Mehfuz Hossain
you can also download a free copy of IDE for .net 2.0 called #develop
from www.icsharpcode.com which has a vb conversion tool. I use it for
vb to c# conversion .
Author
18 May 2006 11:39 AM
Alvin Bruney
You can also use this one:
http://www.kamalpatel.net/Default.htm

--

________________________
Warm regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
Professional VSTO.NET - Wrox/Wiley
The O.W.C. Black Book with .NET
www.lulu.com/owc, Amazon
Blog: http://www.msmvps.com/blogs/alvin
-------------------------------------------------------

Show quote
"Mehfuz Hossain" <meh***@gmail.com> wrote in message
news:1147886617.482637.195930@i40g2000cwc.googlegroups.com...
> you can also download a free copy of IDE for .net 2.0 called #develop
> from www.icsharpcode.com which has a vb conversion tool. I use it for
> vb to c# conversion .
>
Author
19 May 2006 3:18 AM
gs
nice to know but it tends to crash on my vb code - it has marshalas and a
few advanced technique
Show quote
"Alvin Bruney" <www.lulu.com/owc> wrote in message
news:OxMKD$meGHA.1260@TK2MSFTNGP05.phx.gbl...
> You can also use this one:
> http://www.kamalpatel.net/Default.htm
>
> --
>
> ________________________
> Warm regards,
> Alvin Bruney [MVP ASP.NET]
>
> [Shameless Author plug]
> Professional VSTO.NET - Wrox/Wiley
> The O.W.C. Black Book with .NET
> www.lulu.com/owc, Amazon
> Blog: http://www.msmvps.com/blogs/alvin
> -------------------------------------------------------
>
> "Mehfuz Hossain" <meh***@gmail.com> wrote in message
> news:1147886617.482637.195930@i40g2000cwc.googlegroups.com...
>> you can also download a free copy of IDE for .net 2.0 called #develop
>> from www.icsharpcode.com which has a vb conversion tool. I use it for
>> vb to c# conversion .
>>
>
>

AddThis Social Bookmark Button