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 ...
随机推荐
- 快速沃尔什变换 FWT 学习笔记【多项式】
〇.前言 之前看到异或就担心是 FWT,然后才开始想别的. 这次学了 FWT 以后,以后判断应该就很快了吧? 参考资料 FWT 详解 知识点 by neither_nor 集训队论文 2015 集合幂 ...
- 介绍&代码
之前参考前辈实现的分页组件,还ok. 介绍: 基于Web,实现分页样式 和 控制页面内容数据的展示形式. 实现: from django.utils.safestring import mark_sa ...
- javascript的简单查询和插入和修改
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/stri ...
- Linux网络编程服务器模型选择之并发服务器(上)
与循环服务器的串行处理不同,并发服务器对服务请求并发处理.循环服务器只能够一个一个的处理客户端的请求,显然效率很低.并发服务器通过建立多个子进程来实现对请求的并发处理.并发服务器的一个难点是如何确定子 ...
- Linux 下使用yum 命令安装MySQL
Linux下使用yum安装MySQL,以及启动.登录和远程访问MySQL数据库. 1.yum安装mysql 1. 查看有没有安装包: yum list mysql* #移除已经安装的mysq ...
- js解决千分符问题
js脚本function: //js数字千分符处理 function commafy(num) { num = num + ""; var re = /(-?\d+)(\d{3}) ...
- minStack实现
设计包含 min 函数的栈(栈)定义栈的数据结构,要求添加一个 min 函数,能够得到栈的最小元素.要求函数 min.push 以及 pop 的时间复杂度都是 O(1). #include <a ...
- js if和switch,==和===
今天改插件BoxScroll的时候,因为if里面的条件判断多于两个,于是立马想着改写switch.改到一半,忽然记起来JSHint等代码质量检测工具中的一个要求,用===替换==,不用不可靠的强制转型 ...
- (二)JNI方法总结
整个网上就没看到一个关于JNI好点的文档,干脆自己写一份,以方便以后使用的时候查阅 1. 类操作 DefineClass jclass DefineClass(JNIEnv *env, jobject ...
- WebUtility(提供在处理 Web 请求时用于编码和解码 URL 的方法。)
public static string UrlEncode( string str ) UrlEncode(String) 方法可用来编码整个 URL,包括查询字符串值. 如果没有编码情况下,如空格 ...