VB.NET 学习网站 http://www.homeandlearn.co.uk/NET/vbNet.html
1) 用值初始化数组
' The following five lines of code create the same array.
' Preferred syntaxes are on the lines with chars1 and chars2.
Dim chars1 = {"%"c, "&"c, "@"c}
Dim chars2 As Char() = {"%"c, "&"c, "@"c}
Dim chars3() As Char = {"%"c, "&"c, "@"c}
Dim chars4 As Char() = New Char(2) {"%"c, "&"c, "@"c}
Dim chars5() As Char = New Char(2) {"%"c, "&"c, "@"c}
定义整型数组 Dim intNum As Integer() = {1, 2, 3, 4, 5, 6, 6, 6, 6, 6}
2) 函数的重载:函数名一样但是参数的个数或返回值必须不同
void S ( int );
void S ( double , double = 1.2 );
void S ( const char*,const char*);
notes of class in vb. net
1)变量命名格式: prefix+data type+Name e.g. mblnReviewed,m:module varible;bln:boolean;name:Reviewed
class的命名使用名词,properties使用形容词,method使用动词
带返回值的method使用 function,不带返回值的method使用sub
public在类外调用无限制;protected只能在本类使用或子类中使用;缺省的情况下是private
建立class完成后,需要build(生成),并要注意属性里的root namespace(根命名空间)
is eligible for 有资格
special nature 特殊性
differentiate v.区分,区别
2)
combox.selectedtindex=0
3)批量注释ctr+k,ctr+c
取消批量注释ctr+k,ctr+u
4) VB.NET中属性的类型有3种:基本数据类型,枚举类型,结构类型
5)