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
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
Post a Comment