convert this to vb

  • Thread starter Thread starter Brian Henry
  • Start date Start date
B

Brian Henry

public class NntpException : System.ApplicationException
{
public NntpException(string str)
:base(str)
{
}
};

I know it starts out like

puublic class NntpException
inherits System.ApplicationException

public [sub or function] NntpException(byval str as string)
// not sure what to do with : base(str) here... i thought this was
another inherits statement which you cant do in vb like this i think
end sub
end class


what needs changed? thanks
 
Brian,

The 'public NntpException(string str)' is just the class constructor which
in turn is calling the associated constructor of the base class, so in
VB.NET you would do as follows...

\\\
Public Class NntpException
Inherits System.ApplicationException

Public Sub New(ByVal message As String)
MyBase.New(message)
End Sub
End Class
///

HTH,
Gary
 
Try this:


Public Class NntpException
Inherits System.ApplicationException

Public Sub New(ByVal str As String)
MyBase.New(str)
End Sub


End Class
 
* "Brian Henry said:
public class NntpException : System.ApplicationException
{
public NntpException(string str)
:base(str)
{
}
};

I know it starts out like

puublic class NntpException
inherits System.ApplicationException

public [sub or function] NntpException(byval str as string)
// not sure what to do with : base(str) here... i thought this was
another inherits statement which you cant do in vb like this i think
end sub
end class

\\\
Public Class NntpException
Inherits System.ApplicationException

Public Sub New(ByVal str As String)
MyBase.New(str)
...
End Sub
End Class
///

C# -> VB.NET Converters:

<URL:http://www.aspalliance.com/aldotnet/examples/translate.aspx>
<URL:http://www.kamalpatel.net/ConvertCSharp2VB.aspx>
<URL:http://csharpconverter.claritycon.com/>
<URL:http://www.ragingsmurf.com/vbcsharpconverter.aspx>
<URL:http://www.gotdotnet.com/Community/...mpleGuid=c622348b-18a9-47d6-8687-979975d5957d>

<URL:http://www.remotesoft.com/>
-> "Octopus"
 
Back
Top