Oric.CQ

Hi, there!

I need to translate this code to VB, but I don't have any idea about how to do it. Can someone help me, please

public class ZipCode

{

private int zipCode;

private int plusFour;

public static implicit operator ZipCode(string s)

{

return new ZipCode(s);

}

public static implicit operator ZipCode(int i)

{

return new ZipCode(i);

}

}

Many thanks for any kind of help.




Re: Windows Forms General Translating From C# to VB

Mohamed Shifaz

Check this out:

Code Snippet

Public Class ZipCode
Private m_zipcode As Integer
Private m_plusfour As Integer

Public Shared Narrowing Operator CType(ByVal s As String) As ZipCode
Return New ZipCode(s)
End Operator


Public Shared Narrowing Operator CType(ByVal i As Integer) As ZipCode
Return New ZipCode(i)
End Operator
End Class







Re: Windows Forms General Translating From C# to VB

Oric.CQ

Mohamed,

Many thanks for your help.






Re: Windows Forms General Translating From C# to VB

Simao

Hi Oric.CQ

I use this free code translation for .NET

http://www.carlosag.net/Tools/CodeTranslator/Default.aspx

Best Regards,

Simao (portugal)

landsimao.hotmail.com

http://weblogs.pontonetpt.com/landsimao





Re: Windows Forms General Translating From C# to VB

Oric.CQ

Hi, Simao!

Thank you for your repply.

Ciro.