In c# you can have
public class Foo
{
    public Foo(string name)
    {
        //do something
    }
    publi开发者_如何学JAVAc Foo(string name, int bar) : this(name)
    {
        //do something
    }
}
Is there a VB.Net equivalent?
It looks similar to Java in this respect:
Public Class Foo
    Public Sub New(name As String)
        ' Do something '
    End Sub
    Public Sub New(name As String, bar As Integer)
        Me.New(name)
        ' Do something '
    End Sub
End Class
Note that you have to use MyBase.New(...) in case you want to call a constructor of a base class. See also VB.NET OOP Part2 – Understanding Constructors.
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论