VB.NET Syntax Tips
Difference Between C# and VB.NET Namespace
VB.NET
- [Class Namespace in IL]=[Root Namespace].[Namespace in File]
- Class is not automatically added namespace, root namespace is added in background.
- Root namespace is setted at Application Tab of Project Properties.
C#
- [Class Namespace in IL]=[Namespace in File]
- Class is automatically added root namespace.
- Root namespace is setted at Application Tab of Project Properties.
Options
Option Strict On
Option Explicit On
Erase Statement
Used to release array variables and deallocate the The Erase statement dates from old versions of Basic, the kind where manual memory management was useful.
No more, memory management is automatic in .NET. It is still supported for compatibility reasons.
All it does is set the array reference to Nothing. memory used for their elements.
Erase arraylist
Set Variable Name as Keyword
- use square brackets
private [Date] as string
Get Base Class Private Field
correct: Me.GetType().BaseType().GetField("fieldName", BindingFlags.NonPublic Or BindingFlags.Instance)
uncorrect: MyBase.GetType().GetField("fieldName", BindingFlags.NonPublic Or BindingFlags.Instance)
VB.NET Syntax Tips的更多相关文章
- ASP.NET Razor - C# and VB Code Syntax
http://www.w3schools.com/aspnet/razor_syntax.asp Razor supports both C# (C sharp) and VB (Visual Bas ...
- log4net Tutorial
Introduction One of the greatest logging tools out there for .NET is log4net. This software is the g ...
- vim vimrc
set nu set shiftwidth= set tabstop= set softtabstop= set autoindent set cindent set smartindent file ...
- [VB.NET Tips]为VB.NET正名
前言 我于2005年毕业,正值全国上上下下如火如荼的开展企业信息化的时代,正是大规模软件开发的年代. 那时.NET 已经发布了2.0,但是仍是VB6,Delphi,PowerBuilder的天下,是E ...
- [VB.NET Tips]对多行文本的支持
从Visual Studio 2008开始VB.NET支持多行文本. 用法如下: Dim mString As String = <string>我是 一个多 行文本.</strin ...
- [VB.NET Tips]对于基本数据类型的提示
1.类型字符 有时需要直接量后面加上类型字符以明确指定类型,下面把常用的类型字符列出来 类型 字符 Short S Integer I Long L Decimal D Char c Single F ...
- [VB.NET Tips]程序的启动和终止
当执行一个VB.NET应用程序时,CLR会把IL翻译成x86指令,并且寻找一个名为Main的方法. 并从该方法开始执行程序.Main方法也称为程序的"入口"(entry point ...
- [VB.NET Tips]VB.NET专有的字符串处理函数
.NET Framework类库中含有专门为Visual Basic.NET程序员设计的函数和过程. 这些方法虽然是为VB.NET程序员设计的,但是也可以被.NET Framework上支持的任何语言 ...
- [VB.NET Tips]字符串转换为日期
有些字符串需要转换成日期,或者整型转换为日期,可以参考如下思路: Dim result As Date Dim source As String = "20190515" resu ...
随机推荐
- PHP反序列化漏洞新攻击面(BlackHat 2018)
0x00 前言 入职以来好久没有写过文章了,入职的时间里也和师傅们学到了很多,认识了很多的新朋友.最近因为BlackHat 黑客大会的一个议题,PHP反序列化漏洞利用被挖掘出新的攻击面.这里本着记 ...
- mysql启动不起来
在刚编译安装完成mysql,启动mysql时报了下面错误: /etc/init.d/mysqld start Starting MySQL... ERROR! The server quit with ...
- 【实战】Axis2后台Getshell
实战遇到的情况---任意文件读取,读取/conf/axis2.xml内容,读取用户名和密码登录后台 当然弱口令也是屡试不爽的. 操作起来 1.上传cat.aar(链接:https://pan.baid ...
- Mac 10.12安装PDF浏览工具Foxit Reader
说明:永久没费的跨平台PDF浏览工具. 下载: (链接: https://pan.baidu.com/s/1pLEAoXH密码: is5j)
- Run-Time Check Failure #0 - The value of ESP was not properly saved across a function call. 调用函数约定不同
Run-Time Check Failure #0 - The value of ESP was not properly saved across a function call. This is ...
- DesUtils工具类
public final class DesUtils { private static final String DES = "DES"; private static fina ...
- redis实战笔记(1)-第1章 初识Redis
第1章 初识Redis 注:本书在redis3.0版本的,比如redis3.0以后支持服务端集群.3.0之前只能客户端分片. 本章主要内容 1.Redis与其他软件的相同之处和不同之处 2.Re ...
- jquery validate(转)
转自:http://blog.sina.com.cn/s/blog_608475eb0100h3h1.html 官网地址:http://bassistance.de/jquery-plugins/jq ...
- 深入redis内部--实现双向链表
数据结构的应用--Adlist.h定义 1.节点结构 typedef struct listNode { struct listNode *prev; //前向节点 struct lis ...
- IOS7 导航栏适配二
ios7下的app都是全屏的,意思就是所有控制器的view默认都是从 屏幕的 (0,0)开始. 这时候用到导航栏时,往往会出现被导航栏挡住情况. 最明显的是用到tableView时,第一行的数据会被 ...