Visual Studio 笔记

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}

How to: Initialize an Array Variable in Visual Basic 网址: http://msdn.microsoft.com/en-us/library/vstudio/y13tek7e.aspx


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)

 


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值