Partial

Partial

Partial. This modifier specifies that a class is specified in multiple declarations. With Partial, were open a class and add new parts to it. A Class can span multiple files.

VB.NET program that uses Partial

Module Module1

    Partial Class Test
        Public Sub X()
            Console.WriteLine("X")
        End Sub
    End Class

    Partial Class Test
        Public Sub Y()
            Console.WriteLine("Y")
        End Sub
    End Class

    Sub Main()
        ' Invoke methods on the partial class.
        Dim t As Test = New Test()
        t.X()
        t.Y()
    End Sub

End Module

Comments

Popular posts from this blog

Error - vbe6ext.olb could not be loaded

Visual Studio $(TargetDir) macro is empty