博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
VB.NET Syntax Tips
阅读量:7040 次
发布时间:2019-06-28

本文共 1193 字,大约阅读时间需要 3 分钟。

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 OnOption 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)

 

转载于:https://www.cnblogs.com/dalianliyan/p/5391811.html

你可能感兴趣的文章
php 用于绘图使用的颜色数组
查看>>
批处理命令 For循环命令具体解释!
查看>>
JSON扩展类——JsonHelper
查看>>
只有程序员了解的9个真相
查看>>
BDB (Berkeley DB)数据库简单介绍(转载)
查看>>
gpu显存(全局内存)在使用时数据对齐的问题
查看>>
开始使用 Markdown
查看>>
Apache性能优化总结
查看>>
atitit.基于虚拟机的启动器设计 --java 启动器 java生成exe
查看>>
他答对一半(打一字)asp.net开源简答题项目
查看>>
Windows系统创建符号链接文件
查看>>
GCC编译器ABI
查看>>
用python做oj上的简单题(持续更新中.......)
查看>>
ShowcaseView-master
查看>>
ODAC(V9.5.15) 学习笔记(六)TOraSQL、TOraTable和TOraStoredProc
查看>>
c++ A类包含B类指针,B类包含A类指针的情况
查看>>
SQL Server 存储(1/8):理解数据页结构
查看>>
解读ASP.NET 5 & MVC6系列(13):TagHelper
查看>>
JAVA & JSON详解
查看>>
C#编程总结(八)数字签名
查看>>