VB.Net Modules

A module is a piece of program directly on the program stack. Modular programming is a software design technique that emphasizes separating the functionality of a program into independent, interchangeable modules, such that each contains everything necessary to execute only one aspect of the desired functionality.

Module Programming:


Module add
    Public Function addn(ByVal a As Integer, ByVal b As Integer)
        Return a + b
    End Function

End Module



Button Coding:

Public Class Form1

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        TextBox3.Text = addn(TextBox1.Text, TextBox2.Text)
    End Sub
End Class

No comments:

Post a Comment