Public Sub New() button.Text = "Click me!" button.Click.AddHandler(AddressOf ButtonClick) Me.Controls.Add(button) End Sub

Public Sub WriteToFile() Dim writer As New StreamWriter("example.txt") writer.WriteLine("Hello, world!") writer.Close() End Sub

Public Class Employee Inherits Person Public Property Department As String End Class

Sub SayHello(name As String) Console.WriteLine("Hello, " & name) End Sub

VB.NET (Visual Basic .NET) is a modern, object-oriented programming language developed by Microsoft. It's a part of the .NET framework and is widely used for building Windows desktop applications, web applications, and mobile apps.