VB.net Module
来源:互联网 发布:plulive直播软件 编辑:程序博客网 时间:2024/06/08 00:45
In this tutorial, we cover how to create a module, store information inside a module and then access that information in your application. A module can be used to store functions, subs or even variables to sort out your code so that you can access things more easily. If you have a sophisticated application where you have to store a lot of functions, subs or variables then it would be useful to sort them into different categories using modules. A module is differen t to a class because all of the members of a module are shared and a module does not have a consutrctor, meaning you can not create an instance of a module.
Module Code
Module functions Public bla As Integer = 10 Public bla2 As Integer = 20 Public Function addnumbers(ByVal number1 As Integer, ByVal number2 As Integer) Return number1 + number2 End FunctionEnd Module
Code
Public Class Form1 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click TextBox3.Text = addnumbers(bla, bla2) End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click MessageBox.Show(addnumbers(TextBox1.Text, TextBox2.Text)) MessageBox.Show(functions.addnumbers(TextBox1.Text, TextBox2.Text)) End SubEnd Class
- VB.NET中Module
- VB.net Module
- VB.NET中Module的概念
- VB.net 中Module的使用1
- VB.NET中Module的概念
- asp.net(vb.net)连接sql server 2000数据库的连接模块(module)
- asp.net(vb.net)连接sqlserver2000数据库的连接模块(module)
- asp.net(vb.net)连接sql server 2000数据库的连接模块(module) 选择自 sammycheng 的 Blog
- [VB.NET]VB REDIM
- VB与VB.NET
- VB.Net与VB
- VB与VB.NET
- vb.net
- VB。NET
- vb.net
- vb.net
- vb.net
- vb.net
- java web从零单排第七期《struts2》用ActionSupport类验证提交表单
- MAC下mysql的使用
- jQuery学习笔记(基于jquery.1.10.2进行的验证)之一
- 黑马程序员_java基础之异常
- VB.net 中Module的使用1
- VB.net Module
- 华丽的分割线——JavaScript学习笔记
- 实现FusionChart动态获取数据(四)
- android之wifi移植全过程(一)
- Ajax的工作原理(整理)
- 面向对象编程的六大原则
- MFC 文档视图结构程序结构总揽
- hdu 1671 字典树 模板
- 网址收藏