<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
<channel>
<title><![CDATA[聊设计|MyStudio Blog - dotNet]]></title>
<link>https://blog.imwebs.com/</link>
<description><![CDATA[网站设计建设-平面设计-编程学习]]></description>
<language>zh-cn</language>
<copyright><![CDATA[Copyright 2005 PBlog3 v2.8]]></copyright>
<webMaster><![CDATA[webmaster@imwebs.com(Jiexu)]]></webMaster>
<generator>PBlog2 v2.4</generator> 
<image>
	<title>聊设计|MyStudio Blog</title>
	<url>https://blog.imwebs.com/images/logos.gif</url>
	<link>https://blog.imwebs.com/</link>
	<description>聊设计|MyStudio Blog</description>
</image>

			<item>
			<link>https://blog.imwebs.com/article.asp?id=556</link>
			<title><![CDATA[VB.NET 语法快速入门]]></title>
			<author>webmaster@imwebs.com(Admin)</author>
			<category><![CDATA[dotNet]]></category>
			<pubDate>Mon,14 Mar 2011 02:23:00 +0800</pubDate>
			<guid>https://blog.imwebs.com/default.asp?id=556</guid>
		<description><![CDATA[<p>&nbsp;<span class="Apple-style-span" style="line-height: 26px; font-family: Simsun; ">
<ul class="con" style="padding-top: 10px; padding-right: 24px; padding-bottom: 0px; padding-left: 24px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; list-style-type: none; list-style-position: initial; list-style-image: initial; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; line-height: 26px; font-size: 14px; ">
    <p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; text-indent: 28px; ">很久以来我们都知道，VB因为缺乏完善的面向对象支持、缺乏高效的错误处理机制和性能表现不佳，因而一直受到某些人的嘲笑。VB.NET语法将彻底改变这种情况。</p>
    <p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; text-indent: 28px; ">然而，VB.NET在这些方面的改进也要付出代价，许多旧的代码需要手工进行转换才能在VB.NET下运行。</p>
    <p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; text-indent: 28px; ">下面几个表格总结了VB.NET语言在语法上的改动之处。注意这些表格并没有完全列出所有改动之处，但列出了最重要的一些改动。</p>
    <p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; text-indent: 28px; ">表A对比了VB6中一些熟悉的语法形式及其在VB.NET中类似功能最接近的语法形式。</p>
    <p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; text-indent: 28px; ">表A：VB.NET语法对比旧语法 新语法 说明窗体装载事件，类初始化事件 Sub New procedure Sub New称为构造方法（Constructor），它可以有参数。</p>
    <p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; text-indent: 28px; ">Property Let Property Set Let关键词不再有效。</p>
    <p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; text-indent: 28px; ">Currency Decimal 在VB6中，Decimal是Variant的一种子类型，但在。NET中它是一种固有的数据类型。。NET不再支持Currency数据类型。</p>
    <p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; text-indent: 28px; ">Variant Object VB.NET的Object数据类型兼有VB6 Object类型和Variant类型的能力。</p>
    <p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; text-indent: 28px; ">Debug.Print Debug.Write Debug.WriteLine 这个变化只是名称上的简单变化：从Print变为Write和WriteLine. Wend End While VB.NET推荐使用While循环而不是Do循环。</p>
    <p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; text-indent: 28px; ">为了让VB.NET语言的数据类型和其他。VB.NET语言的数据类型相匹配，Microsoft修改了整数类数据类型的表示方法，并加入了一个新的数据类型。这些改动对于进行外部调用的方法尤其重要（比如API调用）。</p>
    <p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; text-indent: 28px; ">例如，如果被调用函数需要一个32位的整数参数，则在VB6中它应该声明为Long，在VB.NET中应该声明为Integer.</p>
    <p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; text-indent: 28px; ">表B：和整数有关的数据类型长度 VB6以及更早版本中的名称 VB.NET中的名称16 bit Integer Short 32 bit Long Integer 64 bit （无） Long</p>
    <p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; text-indent: 28px; ">在VB.NET中，Microsoft减少了许多原先用于VB6的关键词，代之以&ldquo;框架类&rdquo;。之所以要进行这种替换，是因为框架类中的功能对所有的.NET语言都有效。下表列出了部分受影响的关键词。</p>
    <p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; text-indent: 28px; ">表C：被替换的关键词<br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; " />
    VB关键词 VB.NET名称空间中的位置 方法/属性</p>
    <pre style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; font-family: 'Courier New', monospace; font-size: 12px; width: 584px; overflow-x: auto; overflow-y: auto; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: rgb(230, 230, 230); background-position: initial initial; background-repeat: initial initial; "><ol class="dp-xml" style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 20px; margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 1px !important; margin-left: 3em !important; list-style-type: decimal; list-style-position: initial; list-style-image: initial; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: rgb(0, 0, 0); background-image: url(http://images.51cto.com/images/art0910/images/010101bg.gif); background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; line-height: 30px; background-position: initial initial; background-repeat: no-repeat repeat; "><li class="alt" style="padding-top: 0px !important; padding-right: 3px !important; padding-bottom: 0px !important; padding-left: 14px; margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: decimal-leading-zero; list-style-position: outside !important; list-style-image: initial; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: rgb(0, 0, 0); line-height: 24px; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-image: url(http://images.51cto.com/images/art0910/AppData/Roaming/Adobe/Dreamweaver%20CS4/zh_CN/Configuration/images/dt1.gif); background-position: initial initial; background-repeat: no-repeat no-repeat; "><span style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: black; background-color: inherit; "><span style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: black; background-color: inherit; ">Circle&nbsp;System.Drawing.Graphics&nbsp;DrawEllipse &nbsp;</span></span></li><li style="padding-top: 0px !important; padding-right: 3px !important; padding-bottom: 0px !important; padding-left: 14px; margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: decimal-leading-zero; list-style-position: outside !important; list-style-image: initial; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: rgb(0, 0, 0); line-height: 24px; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-image: url(http://images.51cto.com/images/art0910/AppData/Roaming/Adobe/Dreamweaver%20CS4/zh_CN/Configuration/images/dt1.gif); background-position: initial initial; background-repeat: no-repeat no-repeat; "><span style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: black; background-color: inherit; ">&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;</span></li><li class="alt" style="padding-top: 0px !important; padding-right: 3px !important; padding-bottom: 0px !important; padding-left: 14px; margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: decimal-leading-zero; list-style-position: outside !important; list-style-image: initial; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: rgb(0, 0, 0); line-height: 24px; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-image: url(http://images.51cto.com/images/art0910/AppData/Roaming/Adobe/Dreamweaver%20CS4/zh_CN/Configuration/images/dt1.gif); background-position: initial initial; background-repeat: no-repeat no-repeat; "><span style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: black; background-color: inherit; ">&nbsp;&nbsp;&nbsp;&nbsp;Line&nbsp;System.Drawing.Graphics&nbsp;DrawLine &nbsp;</span></li><li style="padding-top: 0px !important; padding-right: 3px !important; padding-bottom: 0px !important; padding-left: 14px; margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: decimal-leading-zero; list-style-position: outside !important; list-style-image: initial; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: rgb(0, 0, 0); line-height: 24px; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-image: url(http://images.51cto.com/images/art0910/AppData/Roaming/Adobe/Dreamweaver%20CS4/zh_CN/Configuration/images/dt1.gif); background-position: initial initial; background-repeat: no-repeat no-repeat; "><span style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: black; background-color: inherit; ">&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;</span></li><li class="alt" style="padding-top: 0px !important; padding-right: 3px !important; padding-bottom: 0px !important; padding-left: 14px; margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: decimal-leading-zero; list-style-position: outside !important; list-style-image: initial; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: rgb(0, 0, 0); line-height: 24px; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-image: url(http://images.51cto.com/images/art0910/AppData/Roaming/Adobe/Dreamweaver%20CS4/zh_CN/Configuration/images/dt1.gif); background-position: initial initial; background-repeat: no-repeat no-repeat; "><span style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: black; background-color: inherit; ">&nbsp;&nbsp;&nbsp;&nbsp;Atn&nbsp;System.Math&nbsp;Atan &nbsp;</span></li><li style="padding-top: 0px !important; padding-right: 3px !important; padding-bottom: 0px !important; padding-left: 14px; margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: decimal-leading-zero; list-style-position: outside !important; list-style-image: initial; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: rgb(0, 0, 0); line-height: 24px; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-image: url(http://images.51cto.com/images/art0910/AppData/Roaming/Adobe/Dreamweaver%20CS4/zh_CN/Configuration/images/dt1.gif); background-position: initial initial; background-repeat: no-repeat no-repeat; "><span style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: black; background-color: inherit; ">&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;</span></li><li class="alt" style="padding-top: 0px !important; padding-right: 3px !important; padding-bottom: 0px !important; padding-left: 14px; margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: decimal-leading-zero; list-style-position: outside !important; list-style-image: initial; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: rgb(0, 0, 0); line-height: 24px; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-image: url(http://images.51cto.com/images/art0910/AppData/Roaming/Adobe/Dreamweaver%20CS4/zh_CN/Configuration/images/dt1.gif); background-position: initial initial; background-repeat: no-repeat no-repeat; "><span style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: black; background-color: inherit; ">&nbsp;&nbsp;&nbsp;&nbsp;Sgn&nbsp;System.Math&nbsp;Sign &nbsp;</span></li><li style="padding-top: 0px !important; padding-right: 3px !important; padding-bottom: 0px !important; padding-left: 14px; margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: decimal-leading-zero; list-style-position: outside !important; list-style-image: initial; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: rgb(0, 0, 0); line-height: 24px; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-image: url(http://images.51cto.com/images/art0910/AppData/Roaming/Adobe/Dreamweaver%20CS4/zh_CN/Configuration/images/dt1.gif); background-position: initial initial; background-repeat: no-repeat no-repeat; "><span style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: black; background-color: inherit; ">&nbsp;</span></li><li class="alt" style="padding-top: 0px !important; padding-right: 3px !important; padding-bottom: 0px !important; padding-left: 14px; margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: decimal-leading-zero; list-style-position: outside !important; list-style-image: initial; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: rgb(0, 0, 0); line-height: 24px; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-image: url(http://images.51cto.com/images/art0910/AppData/Roaming/Adobe/Dreamweaver%20CS4/zh_CN/Configuration/images/dt1.gif); background-position: initial initial; background-repeat: no-repeat no-repeat; "><span style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: black; background-color: inherit; ">&nbsp;&nbsp;&nbsp;&nbsp;Sqr&nbsp;System.Math&nbsp;Sqrt &nbsp;</span></li><li style="padding-top: 0px !important; padding-right: 3px !important; padding-bottom: 0px !important; padding-left: 14px; margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: decimal-leading-zero; list-style-position: outside !important; list-style-image: initial; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: rgb(0, 0, 0); line-height: 24px; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-image: url(http://images.51cto.com/images/art0910/AppData/Roaming/Adobe/Dreamweaver%20CS4/zh_CN/Configuration/images/dt1.gif); background-position: initial initial; background-repeat: no-repeat no-repeat; "><span style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: black; background-color: inherit; ">&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;</span></li><li class="alt" style="padding-top: 0px !important; padding-right: 3px !important; padding-bottom: 0px !important; padding-left: 14px; margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: decimal-leading-zero; list-style-position: outside !important; list-style-image: initial; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: rgb(0, 0, 0); line-height: 24px; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-image: url(http://images.51cto.com/images/art0910/AppData/Roaming/Adobe/Dreamweaver%20CS4/zh_CN/Configuration/images/dt1.gif); background-position: initial initial; background-repeat: no-repeat no-repeat; "><span style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: black; background-color: inherit; ">&nbsp;&nbsp;&nbsp;&nbsp;Rnd&nbsp;Microsoft.VisualBasic.Compatibility.VB6&nbsp;Rnd &nbsp;</span></li><li style="padding-top: 0px !important; padding-right: 3px !important; padding-bottom: 0px !important; padding-left: 14px; margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: decimal-leading-zero; list-style-position: outside !important; list-style-image: initial; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: rgb(0, 0, 0); line-height: 24px; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-image: url(http://images.51cto.com/images/art0910/AppData/Roaming/Adobe/Dreamweaver%20CS4/zh_CN/Configuration/images/dt1.gif); background-position: initial initial; background-repeat: no-repeat no-repeat; "><span style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: black; background-color: inherit; ">&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;</span></li><li class="alt" style="padding-top: 0px !important; padding-right: 3px !important; padding-bottom: 0px !important; padding-left: 14px; margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: decimal-leading-zero; list-style-position: outside !important; list-style-image: initial; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: rgb(0, 0, 0); line-height: 24px; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-image: url(http://images.51cto.com/images/art0910/AppData/Roaming/Adobe/Dreamweaver%20CS4/zh_CN/Configuration/images/dt1.gif); background-position: initial initial; background-repeat: no-repeat no-repeat; "><span style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: black; background-color: inherit; ">&nbsp;&nbsp;&nbsp;&nbsp;Round&nbsp;Microsoft.VisualBasic.Compatibility.VB6&nbsp;Round &nbsp;</span></li><li style="padding-top: 0px !important; padding-right: 3px !important; padding-bottom: 0px !important; padding-left: 14px; margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: decimal-leading-zero; list-style-position: outside !important; list-style-image: initial; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: rgb(0, 0, 0); line-height: 24px; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-image: url(http://images.51cto.com/images/art0910/AppData/Roaming/Adobe/Dreamweaver%20CS4/zh_CN/Configuration/images/dt1.gif); background-position: initial initial; background-repeat: no-repeat no-repeat; "><span style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: black; background-color: inherit; ">&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;</span></li><li class="alt" style="padding-top: 0px !important; padding-right: 3px !important; padding-bottom: 0px !important; padding-left: 14px; margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: decimal-leading-zero; list-style-position: outside !important; list-style-image: initial; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: rgb(0, 0, 0); line-height: 24px; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-image: url(http://images.51cto.com/images/art0910/AppData/Roaming/Adobe/Dreamweaver%20CS4/zh_CN/Configuration/images/dt1.gif); background-position: initial initial; background-repeat: no-repeat no-repeat; "><span style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: black; background-color: inherit; ">&nbsp;&nbsp;&nbsp;&nbsp;Lset&nbsp;System.String&nbsp;PadRight &nbsp;</span></li><li style="padding-top: 0px !important; padding-right: 3px !important; padding-bottom: 0px !important; padding-left: 14px; margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: decimal-leading-zero; list-style-position: outside !important; list-style-image: initial; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: rgb(0, 0, 0); line-height: 24px; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-image: url(http://images.51cto.com/images/art0910/AppData/Roaming/Adobe/Dreamweaver%20CS4/zh_CN/Configuration/images/dt1.gif); background-position: initial initial; background-repeat: no-repeat no-repeat; "><span style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: black; background-color: inherit; ">&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;</span></li><li class="alt" style="padding-top: 0px !important; padding-right: 3px !important; padding-bottom: 0px !important; padding-left: 14px; margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: decimal-leading-zero; list-style-position: outside !important; list-style-image: initial; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: rgb(0, 0, 0); line-height: 24px; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-image: url(http://images.51cto.com/images/art0910/AppData/Roaming/Adobe/Dreamweaver%20CS4/zh_CN/Configuration/images/dt1.gif); background-position: initial initial; background-repeat: no-repeat no-repeat; "><span style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: black; background-color: inherit; ">&nbsp;&nbsp;&nbsp;&nbsp;Rset&nbsp;System.String&nbsp;PadLeft &nbsp;</span></li><li style="padding-top: 0px !important; padding-right: 3px !important; padding-bottom: 0px !important; padding-left: 14px; margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: decimal-leading-zero; list-style-position: outside !important; list-style-image: initial; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: rgb(0, 0, 0); line-height: 24px; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-image: url(http://images.51cto.com/images/art0910/AppData/Roaming/Adobe/Dreamweaver%20CS4/zh_CN/Configuration/images/dt1.gif); background-position: initial initial; background-repeat: no-repeat no-repeat; "><span style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: black; background-color: inherit; ">&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;</span></li><li class="alt" style="padding-top: 0px !important; padding-right: 3px !important; padding-bottom: 0px !important; padding-left: 14px; margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: decimal-leading-zero; list-style-position: outside !important; list-style-image: initial; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: rgb(0, 0, 0); line-height: 24px; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-image: url(http://images.51cto.com/images/art0910/AppData/Roaming/Adobe/Dreamweaver%20CS4/zh_CN/Configuration/images/dt1.gif); background-position: initial initial; background-repeat: no-repeat no-repeat; "><span style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: black; background-color: inherit; ">&nbsp;&nbsp;&nbsp;&nbsp;DoEvents&nbsp;System.Winforms.Application&nbsp;DoEvents &nbsp;</span></li><li style="padding-top: 0px !important; padding-right: 3px !important; padding-bottom: 0px !important; padding-left: 14px; margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: decimal-leading-zero; list-style-position: outside !important; list-style-image: initial; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: rgb(0, 0, 0); line-height: 24px; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-image: url(http://images.51cto.com/images/art0910/AppData/Roaming/Adobe/Dreamweaver%20CS4/zh_CN/Configuration/images/dt1.gif); background-position: initial initial; background-repeat: no-repeat no-repeat; "><span style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: black; background-color: inherit; ">&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;</span></li><li class="alt" style="padding-top: 0px !important; padding-right: 3px !important; padding-bottom: 0px !important; padding-left: 14px; margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: decimal-leading-zero; list-style-position: outside !important; list-style-image: initial; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: rgb(0, 0, 0); line-height: 24px; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-image: url(http://images.51cto.com/images/art0910/AppData/Roaming/Adobe/Dreamweaver%20CS4/zh_CN/Configuration/images/dt1.gif); background-position: initial initial; background-repeat: no-repeat no-repeat; "><span style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: black; background-color: inherit; ">&nbsp;&nbsp;&nbsp;&nbsp;VarType&nbsp;System.Object&nbsp;GetType（返回类Type的对象，其中包含了可提取出信息的属性） &nbsp;</span></li><li style="padding-top: 0px !important; padding-right: 3px !important; padding-bottom: 0px !important; padding-left: 14px; margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: decimal-leading-zero; list-style-position: outside !important; list-style-image: initial; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: rgb(0, 0, 0); line-height: 24px; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-image: url(http://images.51cto.com/images/art0910/AppData/Roaming/Adobe/Dreamweaver%20CS4/zh_CN/Configuration/images/dt1.gif); background-position: initial initial; background-repeat: no-repeat no-repeat; "><span style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: black; background-color: inherit; ">&nbsp;</span></li></ol></pre>
    <p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; text-indent: 28px; ">在VB.NET中，变量、数组的声明和初始化方法都有所变化，下表概要地列出了VB.NET在这方面的变化。</p>
    <p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; text-indent: 28px; ">表D：新的声明方法<br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; " />
    变化 语法举例<br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; " />
    单个声明语句中不能声明多种类型。 'VB.NET不允许出现下面这种声明!<br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; " />
    Dim nCount As Integer, bAnswer As Boolean<br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; " />
    声明变量时可赋予初始值 Dim nCount As Integer = 20<br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; " />
    Dim nDoubleCount as Integer = nCount * 2<br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; " />
    允许为数组元素指定初始值 Dim nIndex(3) As Integer = (3, 5, 7)<br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; " />
    不能用Redim进行声明，只能用Redim重新定义数组大小。 '下面这行代码在VB.NET中不合法!</p>
    <pre style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; font-family: 'Courier New', monospace; font-size: 12px; width: 584px; overflow-x: auto; overflow-y: auto; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: rgb(230, 230, 230); background-position: initial initial; background-repeat: initial initial; "><ol class="dp-xml" style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 20px; margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 1px !important; margin-left: 3em !important; list-style-type: decimal; list-style-position: initial; list-style-image: initial; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: rgb(0, 0, 0); background-image: url(http://images.51cto.com/images/art0910/images/010101bg.gif); background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; line-height: 30px; background-position: initial initial; background-repeat: no-repeat repeat; "><li class="alt" style="padding-top: 0px !important; padding-right: 3px !important; padding-bottom: 0px !important; padding-left: 14px; margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: decimal-leading-zero; list-style-position: outside !important; list-style-image: initial; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: rgb(0, 0, 0); line-height: 24px; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-image: url(http://images.51cto.com/images/art0910/AppData/Roaming/Adobe/Dreamweaver%20CS4/zh_CN/Configuration/images/dt1.gif); background-position: initial initial; background-repeat: no-repeat no-repeat; "><span style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: black; background-color: inherit; "><span style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: black; background-color: inherit; ">Redim&nbsp;sName()&nbsp;As&nbsp;String&nbsp;</span></span></li></ol></pre>
    <p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; text-indent: 28px; ">大量新关键词实现了VB.NET中的新功能。下面是一些最重要的关键词及其用途、用法简例。</p>
    <p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; text-indent: 28px; ">表E：VB.NET的新关键词<br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; " />
    关键词 用途 简单例子<br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; " />
    Inherits 指向基类，用于实现继承。 Inherits System.WinForms.Form<br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; " />
    MyBase 在子类的代码中，MyBase引用基类。 StringProperty = MyBase.StringProperty<br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; " />
    Shared Shared表示类的所有实例共享类里面的变量。</p>
    <pre style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; font-family: 'Courier New', monospace; font-size: 12px; width: 584px; overflow-x: auto; overflow-y: auto; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: rgb(230, 230, 230); background-position: initial initial; background-repeat: initial initial; "><ol class="dp-xml" style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 20px; margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 1px !important; margin-left: 3em !important; list-style-type: decimal; list-style-position: initial; list-style-image: initial; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: rgb(0, 0, 0); background-image: url(http://images.51cto.com/images/art0910/images/010101bg.gif); background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; line-height: 30px; background-position: initial initial; background-repeat: no-repeat repeat; "><li class="alt" style="padding-top: 0px !important; padding-right: 3px !important; padding-bottom: 0px !important; padding-left: 14px; margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: decimal-leading-zero; list-style-position: outside !important; list-style-image: initial; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: rgb(0, 0, 0); line-height: 24px; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-image: url(http://images.51cto.com/images/art0910/AppData/Roaming/Adobe/Dreamweaver%20CS4/zh_CN/Configuration/images/dt1.gif); background-position: initial initial; background-repeat: no-repeat no-repeat; "><span style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: black; background-color: inherit; "><span style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: black; background-color: inherit; ">Public&nbsp;Shared&nbsp;BaseLocation&nbsp;As&nbsp;String &nbsp;</span></span></li><li style="padding-top: 0px !important; padding-right: 3px !important; padding-bottom: 0px !important; padding-left: 14px; margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: decimal-leading-zero; list-style-position: outside !important; list-style-image: initial; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: rgb(0, 0, 0); line-height: 24px; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-image: url(http://images.51cto.com/images/art0910/AppData/Roaming/Adobe/Dreamweaver%20CS4/zh_CN/Configuration/images/dt1.gif); background-position: initial initial; background-repeat: no-repeat no-repeat; "><span style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: black; background-color: inherit; ">&nbsp;&nbsp;&nbsp;&nbsp;Try &nbsp;</span></li><li class="alt" style="padding-top: 0px !important; padding-right: 3px !important; padding-bottom: 0px !important; padding-left: 14px; margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: decimal-leading-zero; list-style-position: outside !important; list-style-image: initial; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: rgb(0, 0, 0); line-height: 24px; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-image: url(http://images.51cto.com/images/art0910/AppData/Roaming/Adobe/Dreamweaver%20CS4/zh_CN/Configuration/images/dt1.gif); background-position: initial initial; background-repeat: no-repeat no-repeat; "><span style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: black; background-color: inherit; ">&nbsp;&nbsp;&nbsp;&nbsp;Catch &nbsp;</span></li><li style="padding-top: 0px !important; padding-right: 3px !important; padding-bottom: 0px !important; padding-left: 14px; margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: decimal-leading-zero; list-style-position: outside !important; list-style-image: initial; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: rgb(0, 0, 0); line-height: 24px; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-image: url(http://images.51cto.com/images/art0910/AppData/Roaming/Adobe/Dreamweaver%20CS4/zh_CN/Configuration/images/dt1.gif); background-position: initial initial; background-repeat: no-repeat no-repeat; "><span style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: black; background-color: inherit; ">&nbsp;&nbsp;&nbsp;&nbsp;Finally &nbsp;</span></li></ol></pre>
    <p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; text-indent: 28px; ">Throw 这是新的错误处理关键词。Try开始一个启用错误控制的代码块，Catch标识一个对特定错误进行处理的代码块，Finally开始一个不管错误是否出现都必须执行的代码块，Throw抛出一个错误（类似于VB6的Err.Raise）。</p>
    <pre style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; font-family: 'Courier New', monospace; font-size: 12px; width: 584px; overflow-x: auto; overflow-y: auto; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: rgb(230, 230, 230); background-position: initial initial; background-repeat: initial initial; "><ol class="dp-xml" style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 20px; margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 1px !important; margin-left: 3em !important; list-style-type: decimal; list-style-position: initial; list-style-image: initial; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: rgb(0, 0, 0); background-image: url(http://images.51cto.com/images/art0910/images/010101bg.gif); background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; line-height: 30px; background-position: initial initial; background-repeat: no-repeat repeat; "><li class="alt" style="padding-top: 0px !important; padding-right: 3px !important; padding-bottom: 0px !important; padding-left: 14px; margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: decimal-leading-zero; list-style-position: outside !important; list-style-image: initial; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: rgb(0, 0, 0); line-height: 24px; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-image: url(http://images.51cto.com/images/art0910/AppData/Roaming/Adobe/Dreamweaver%20CS4/zh_CN/Configuration/images/dt1.gif); background-position: initial initial; background-repeat: no-repeat no-repeat; "><span style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: black; background-color: inherit; "><span style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: black; background-color: inherit; ">Try &nbsp;</span></span></li><li style="padding-top: 0px !important; padding-right: 3px !important; padding-bottom: 0px !important; padding-left: 14px; margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: decimal-leading-zero; list-style-position: outside !important; list-style-image: initial; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: rgb(0, 0, 0); line-height: 24px; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-image: url(http://images.51cto.com/images/art0910/AppData/Roaming/Adobe/Dreamweaver%20CS4/zh_CN/Configuration/images/dt1.gif); background-position: initial initial; background-repeat: no-repeat no-repeat; "><span style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: black; background-color: inherit; ">&nbsp;&nbsp;&nbsp;&nbsp;rsRecordset.Update &nbsp;</span></li><li class="alt" style="padding-top: 0px !important; padding-right: 3px !important; padding-bottom: 0px !important; padding-left: 14px; margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: decimal-leading-zero; list-style-position: outside !important; list-style-image: initial; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: rgb(0, 0, 0); line-height: 24px; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-image: url(http://images.51cto.com/images/art0910/AppData/Roaming/Adobe/Dreamweaver%20CS4/zh_CN/Configuration/images/dt1.gif); background-position: initial initial; background-repeat: no-repeat no-repeat; "><span style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: black; background-color: inherit; ">&nbsp;&nbsp;&nbsp;&nbsp;Catch &nbsp;</span></li><li style="padding-top: 0px !important; padding-right: 3px !important; padding-bottom: 0px !important; padding-left: 14px; margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: decimal-leading-zero; list-style-position: outside !important; list-style-image: initial; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: rgb(0, 0, 0); line-height: 24px; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-image: url(http://images.51cto.com/images/art0910/AppData/Roaming/Adobe/Dreamweaver%20CS4/zh_CN/Configuration/images/dt1.gif); background-position: initial initial; background-repeat: no-repeat no-repeat; "><span style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: black; background-color: inherit; ">&nbsp;&nbsp;&nbsp;&nbsp;LogError&nbsp;(&quot;更新失败！&quot;) &nbsp;</span></li><li class="alt" style="padding-top: 0px !important; padding-right: 3px !important; padding-bottom: 0px !important; padding-left: 14px; margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: decimal-leading-zero; list-style-position: outside !important; list-style-image: initial; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: rgb(0, 0, 0); line-height: 24px; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-image: url(http://images.51cto.com/images/art0910/AppData/Roaming/Adobe/Dreamweaver%20CS4/zh_CN/Configuration/images/dt1.gif); background-position: initial initial; background-repeat: no-repeat no-repeat; "><span style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: black; background-color: inherit; ">&nbsp;&nbsp;&nbsp;&nbsp;Finally &nbsp;</span></li><li style="padding-top: 0px !important; padding-right: 3px !important; padding-bottom: 0px !important; padding-left: 14px; margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: decimal-leading-zero; list-style-position: outside !important; list-style-image: initial; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: rgb(0, 0, 0); line-height: 24px; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-image: url(http://images.51cto.com/images/art0910/AppData/Roaming/Adobe/Dreamweaver%20CS4/zh_CN/Configuration/images/dt1.gif); background-position: initial initial; background-repeat: no-repeat no-repeat; "><span style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: black; background-color: inherit; ">&nbsp;&nbsp;&nbsp;&nbsp;rsRecordset.MoveNext &nbsp;</span></li><li class="alt" style="padding-top: 0px !important; padding-right: 3px !important; padding-bottom: 0px !important; padding-left: 14px; margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: decimal-leading-zero; list-style-position: outside !important; list-style-image: initial; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: rgb(0, 0, 0); line-height: 24px; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-image: url(http://images.51cto.com/images/art0910/AppData/Roaming/Adobe/Dreamweaver%20CS4/zh_CN/Configuration/images/dt1.gif); background-position: initial initial; background-repeat: no-repeat no-repeat; "><span style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: black; background-color: inherit; ">&nbsp;&nbsp;&nbsp;&nbsp;End&nbsp;Try &nbsp;</span></li><li style="padding-top: 0px !important; padding-right: 3px !important; padding-bottom: 0px !important; padding-left: 14px; margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: decimal-leading-zero; list-style-position: outside !important; list-style-image: initial; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: rgb(0, 0, 0); line-height: 24px; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-image: url(http://images.51cto.com/images/art0910/AppData/Roaming/Adobe/Dreamweaver%20CS4/zh_CN/Configuration/images/dt1.gif); background-position: initial initial; background-repeat: no-repeat no-repeat; "><span style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: black; background-color: inherit; ">&nbsp;&nbsp;&nbsp;&nbsp;ReadOnly&nbsp;在属性声明中，ReadOnly指示一个只读的属性（只有Get过程的属性）。&nbsp;Public&nbsp;ReadOnly&nbsp;Property &nbsp;</span></li><li class="alt" style="padding-top: 0px !important; padding-right: 3px !important; padding-bottom: 0px !important; padding-left: 14px; margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: decimal-leading-zero; list-style-position: outside !important; list-style-image: initial; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: rgb(0, 0, 0); line-height: 24px; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-image: url(http://images.51cto.com/images/art0910/AppData/Roaming/Adobe/Dreamweaver%20CS4/zh_CN/Configuration/images/dt1.gif); background-position: initial initial; background-repeat: no-repeat no-repeat; "><span style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: black; background-color: inherit; ">&nbsp;&nbsp;&nbsp;&nbsp;StringProperty()&nbsp;As&nbsp;String &nbsp;</span></li><li style="padding-top: 0px !important; padding-right: 3px !important; padding-bottom: 0px !important; padding-left: 14px; margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: decimal-leading-zero; list-style-position: outside !important; list-style-image: initial; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: rgb(0, 0, 0); line-height: 24px; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-image: url(http://images.51cto.com/images/art0910/AppData/Roaming/Adobe/Dreamweaver%20CS4/zh_CN/Configuration/images/dt1.gif); background-position: initial initial; background-repeat: no-repeat no-repeat; "><span style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: black; background-color: inherit; ">&nbsp;&nbsp;&nbsp;&nbsp;WriteOnly&nbsp;在属性声明中，WriteOnly指示一个只能写入的属性（只有Set过程的属性）。&nbsp;Public&nbsp;WriteOnly&nbsp;Property &nbsp;</span></li><li class="alt" style="padding-top: 0px !important; padding-right: 3px !important; padding-bottom: 0px !important; padding-left: 14px; margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: decimal-leading-zero; list-style-position: outside !important; list-style-image: initial; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: rgb(0, 0, 0); line-height: 24px; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-image: url(http://images.51cto.com/images/art0910/AppData/Roaming/Adobe/Dreamweaver%20CS4/zh_CN/Configuration/images/dt1.gif); background-position: initial initial; background-repeat: no-repeat no-repeat; "><span style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: black; background-color: inherit; ">&nbsp;&nbsp;&nbsp;&nbsp;StringProperty()&nbsp;As&nbsp;String &nbsp;</span></li><li style="padding-top: 0px !important; padding-right: 3px !important; padding-bottom: 0px !important; padding-left: 14px; margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: decimal-leading-zero; list-style-position: outside !important; list-style-image: initial; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: rgb(0, 0, 0); line-height: 24px; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-image: url(http://images.51cto.com/images/art0910/AppData/Roaming/Adobe/Dreamweaver%20CS4/zh_CN/Configuration/images/dt1.gif); background-position: initial initial; background-repeat: no-repeat no-repeat; "><span style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: black; background-color: inherit; ">&nbsp;&nbsp;&nbsp;&nbsp;Char&nbsp;这是VB.NET中的单字符数据类型。&nbsp;Dim&nbsp;chrInitial&nbsp;As&nbsp;Char &nbsp;</span></li><li class="alt" style="padding-top: 0px !important; padding-right: 3px !important; padding-bottom: 0px !important; padding-left: 14px; margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: decimal-leading-zero; list-style-position: outside !important; list-style-image: initial; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: rgb(0, 0, 0); line-height: 24px; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-image: url(http://images.51cto.com/images/art0910/AppData/Roaming/Adobe/Dreamweaver%20CS4/zh_CN/Configuration/images/dt1.gif); background-position: initial initial; background-repeat: no-repeat no-repeat; "><span style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: black; background-color: inherit; ">&nbsp;&nbsp;&nbsp;&nbsp;Imports&nbsp;在当前代码模块中引入指定类。&nbsp;Imports&nbsp;System.WinForms &nbsp;</span></li><li style="padding-top: 0px !important; padding-right: 3px !important; padding-bottom: 0px !important; padding-left: 14px; margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: decimal-leading-zero; list-style-position: outside !important; list-style-image: initial; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: rgb(0, 0, 0); line-height: 24px; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-image: url(http://images.51cto.com/images/art0910/AppData/Roaming/Adobe/Dreamweaver%20CS4/zh_CN/Configuration/images/dt1.gif); background-position: initial initial; background-repeat: no-repeat no-repeat; "><span style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: black; background-color: inherit; ">&nbsp;&nbsp;&nbsp;&nbsp;Namespace&nbsp;为模块指定名称空间（Namespace）。&nbsp;Namespace&nbsp;MyApplicationName &nbsp;</span></li><li class="alt" style="padding-top: 0px !important; padding-right: 3px !important; padding-bottom: 0px !important; padding-left: 14px; margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: decimal-leading-zero; list-style-position: outside !important; list-style-image: initial; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: rgb(0, 0, 0); line-height: 24px; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-image: url(http://images.51cto.com/images/art0910/AppData/Roaming/Adobe/Dreamweaver%20CS4/zh_CN/Configuration/images/dt1.gif); background-position: initial initial; background-repeat: no-repeat no-repeat; "><span style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: black; background-color: inherit; ">&nbsp;&nbsp;&nbsp;&nbsp;Overloads&nbsp;重载。Overloads表示同一个函数名字有多个版本的实现，编译器通过函数的参数列表区分它们。&nbsp;'同一个模块之内包含如下多个声明... &nbsp;</span></li><li style="padding-top: 0px !important; padding-right: 3px !important; padding-bottom: 0px !important; padding-left: 14px; margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: decimal-leading-zero; list-style-position: outside !important; list-style-image: initial; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: rgb(0, 0, 0); line-height: 24px; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-image: url(http://images.51cto.com/images/art0910/AppData/Roaming/Adobe/Dreamweaver%20CS4/zh_CN/Configuration/images/dt1.gif); background-position: initial initial; background-repeat: no-repeat no-repeat; "><span style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: black; background-color: inherit; ">&nbsp;&nbsp;&nbsp;&nbsp;Overloads&nbsp;Sub&nbsp;Display(sIn&nbsp;as&nbsp;String) &nbsp;</span></li><li class="alt" style="padding-top: 0px !important; padding-right: 3px !important; padding-bottom: 0px !important; padding-left: 14px; margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: decimal-leading-zero; list-style-position: outside !important; list-style-image: initial; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: rgb(0, 0, 0); line-height: 24px; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-image: url(http://images.51cto.com/images/art0910/AppData/Roaming/Adobe/Dreamweaver%20CS4/zh_CN/Configuration/images/dt1.gif); background-position: initial initial; background-repeat: no-repeat no-repeat; "><span style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: black; background-color: inherit; ">&nbsp;&nbsp;&nbsp;&nbsp;Overloads&nbsp;Sub&nbsp;Display(nIn&nbsp;as&nbsp;Long) &nbsp;</span></li><li style="padding-top: 0px !important; padding-right: 3px !important; padding-bottom: 0px !important; padding-left: 14px; margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: decimal-leading-zero; list-style-position: outside !important; list-style-image: initial; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: rgb(0, 0, 0); line-height: 24px; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-image: url(http://images.51cto.com/images/art0910/AppData/Roaming/Adobe/Dreamweaver%20CS4/zh_CN/Configuration/images/dt1.gif); background-position: initial initial; background-repeat: no-repeat no-repeat; "><span style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: black; background-color: inherit; ">&nbsp;&nbsp;&nbsp;&nbsp;Overrides&nbsp;覆盖。Overrides表示成员函数覆盖当前类所继承的基类中的指定方法。&nbsp;Inherits&nbsp;MyBaseClass &nbsp;</span></li><li class="alt" style="padding-top: 0px !important; padding-right: 3px !important; padding-bottom: 0px !important; padding-left: 14px; margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: decimal-leading-zero; list-style-position: outside !important; list-style-image: initial; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: rgb(0, 0, 0); line-height: 24px; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-image: url(http://images.51cto.com/images/art0910/AppData/Roaming/Adobe/Dreamweaver%20CS4/zh_CN/Configuration/images/dt1.gif); background-position: initial initial; background-repeat: no-repeat no-repeat; "><span style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: black; background-color: inherit; ">&nbsp;&nbsp;&nbsp;&nbsp;Overrides&nbsp;Function&nbsp;Name(nID&nbsp;as&nbsp;Long)&nbsp;_ &nbsp;</span></li><li style="padding-top: 0px !important; padding-right: 3px !important; padding-bottom: 0px !important; padding-left: 14px; margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: decimal-leading-zero; list-style-position: outside !important; list-style-image: initial; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: rgb(0, 0, 0); line-height: 24px; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-image: url(http://images.51cto.com/images/art0910/AppData/Roaming/Adobe/Dreamweaver%20CS4/zh_CN/Configuration/images/dt1.gif); background-position: initial initial; background-repeat: no-repeat no-repeat; "><span style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: black; background-color: inherit; ">&nbsp;&nbsp;&nbsp;&nbsp;As&nbsp;String &nbsp;</span></li><li class="alt" style="padding-top: 0px !important; padding-right: 3px !important; padding-bottom: 0px !important; padding-left: 14px; margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: decimal-leading-zero; list-style-position: outside !important; list-style-image: initial; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: rgb(0, 0, 0); line-height: 24px; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-image: url(http://images.51cto.com/images/art0910/AppData/Roaming/Adobe/Dreamweaver%20CS4/zh_CN/Configuration/images/dt1.gif); background-position: initial initial; background-repeat: no-repeat no-repeat; "><span style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: black; background-color: inherit; ">&nbsp;&nbsp;&nbsp;&nbsp;Overridable&nbsp;Overridable表示任意从当前类继承的类都可以覆盖指定成员函数。&nbsp;Overridable&nbsp;Function&nbsp;Name&nbsp;_ &nbsp;</span></li><li style="padding-top: 0px !important; padding-right: 3px !important; padding-bottom: 0px !important; padding-left: 14px; margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: decimal-leading-zero; list-style-position: outside !important; list-style-image: initial; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: rgb(0, 0, 0); line-height: 24px; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-image: url(http://images.51cto.com/images/art0910/AppData/Roaming/Adobe/Dreamweaver%20CS4/zh_CN/Configuration/images/dt1.gif); background-position: initial initial; background-repeat: no-repeat no-repeat; "><span style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: black; background-color: inherit; ">&nbsp;&nbsp;&nbsp;&nbsp;(nID&nbsp;as&nbsp;Long)&nbsp;As&nbsp;String &nbsp;</span></li><li class="alt" style="padding-top: 0px !important; padding-right: 3px !important; padding-bottom: 0px !important; padding-left: 14px; margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: decimal-leading-zero; list-style-position: outside !important; list-style-image: initial; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: rgb(0, 0, 0); line-height: 24px; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-image: url(http://images.51cto.com/images/art0910/AppData/Roaming/Adobe/Dreamweaver%20CS4/zh_CN/Configuration/images/dt1.gif); background-position: initial initial; background-repeat: no-repeat no-repeat; "><span style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: black; background-color: inherit; ">&nbsp;&nbsp;&nbsp;&nbsp;MustOverride&nbsp;MustOverride表示任意从当前类继承的类都必须覆盖指定成员函数。&nbsp;MustOverride&nbsp;Function&nbsp;Name&nbsp;_ &nbsp;</span></li><li style="padding-top: 0px !important; padding-right: 3px !important; padding-bottom: 0px !important; padding-left: 14px; margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: decimal-leading-zero; list-style-position: outside !important; list-style-image: initial; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: rgb(0, 0, 0); line-height: 24px; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-image: url(http://images.51cto.com/images/art0910/AppData/Roaming/Adobe/Dreamweaver%20CS4/zh_CN/Configuration/images/dt1.gif); background-position: initial initial; background-repeat: no-repeat no-repeat; "><span style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: black; background-color: inherit; ">&nbsp;&nbsp;&nbsp;&nbsp;(nID&nbsp;as&nbsp;Long)&nbsp;As&nbsp;String &nbsp;</span></li><li class="alt" style="padding-top: 0px !important; padding-right: 3px !important; padding-bottom: 0px !important; padding-left: 14px; margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: decimal-leading-zero; list-style-position: outside !important; list-style-image: initial; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: rgb(0, 0, 0); line-height: 24px; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-image: url(http://images.51cto.com/images/art0910/AppData/Roaming/Adobe/Dreamweaver%20CS4/zh_CN/Configuration/images/dt1.gif); background-position: initial initial; background-repeat: no-repeat no-repeat; "><span style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: black; background-color: inherit; ">&nbsp;</span></li><li style="padding-top: 0px !important; padding-right: 3px !important; padding-bottom: 0px !important; padding-left: 14px; margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: decimal-leading-zero; list-style-position: outside !important; list-style-image: initial; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: rgb(0, 0, 0); line-height: 24px; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-image: url(http://images.51cto.com/images/art0910/AppData/Roaming/Adobe/Dreamweaver%20CS4/zh_CN/Configuration/images/dt1.gif); background-position: initial initial; background-repeat: no-repeat no-repeat; "><span style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: black; background-color: inherit; ">&nbsp;&nbsp;&nbsp;&nbsp;Protected&nbsp;Protected表示成员函数只能从当前类的派生类访问。&nbsp;Protected&nbsp;Sub&nbsp;Clear() &nbsp;</span></li><li class="alt" style="padding-top: 0px !important; padding-right: 3px !important; padding-bottom: 0px !important; padding-left: 14px; margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: decimal-leading-zero; list-style-position: outside !important; list-style-image: initial; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: rgb(0, 0, 0); line-height: 24px; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-image: url(http://images.51cto.com/images/art0910/AppData/Roaming/Adobe/Dreamweaver%20CS4/zh_CN/Configuration/images/dt1.gif); background-position: initial initial; background-repeat: no-repeat no-repeat; "><span style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: black; background-color: inherit; ">&nbsp;</span></li></ol></pre>
    <p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; text-indent: 28px; ">在以前的VB中，直至VB 4为止， Let、Set和Get属性过程是分离的。VB.NET把同一属性的属性过程放到了一起：</p>
    <pre style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; font-family: 'Courier New', monospace; font-size: 12px; width: 584px; overflow-x: auto; overflow-y: auto; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: rgb(230, 230, 230); background-position: initial initial; background-repeat: initial initial; "><ol class="dp-xml" style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 20px; margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 1px !important; margin-left: 3em !important; list-style-type: decimal; list-style-position: initial; list-style-image: initial; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: rgb(0, 0, 0); background-image: url(http://images.51cto.com/images/art0910/images/010101bg.gif); background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; line-height: 30px; background-position: initial initial; background-repeat: no-repeat repeat; "><li class="alt" style="padding-top: 0px !important; padding-right: 3px !important; padding-bottom: 0px !important; padding-left: 14px; margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: decimal-leading-zero; list-style-position: outside !important; list-style-image: initial; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: rgb(0, 0, 0); line-height: 24px; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-image: url(http://images.51cto.com/images/art0910/AppData/Roaming/Adobe/Dreamweaver%20CS4/zh_CN/Configuration/images/dt1.gif); background-position: initial initial; background-repeat: no-repeat no-repeat; "><span style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: black; background-color: inherit; "><span style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: black; background-color: inherit; ">Private&nbsp;msMyStringProperty&nbsp;As&nbsp;String &nbsp;</span></span></li><li style="padding-top: 0px !important; padding-right: 3px !important; padding-bottom: 0px !important; padding-left: 14px; margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: decimal-leading-zero; list-style-position: outside !important; list-style-image: initial; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: rgb(0, 0, 0); line-height: 24px; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-image: url(http://images.51cto.com/images/art0910/AppData/Roaming/Adobe/Dreamweaver%20CS4/zh_CN/Configuration/images/dt1.gif); background-position: initial initial; background-repeat: no-repeat no-repeat; "><span style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: black; background-color: inherit; ">&nbsp;&nbsp;&nbsp;&nbsp;'&nbsp;声明区 &nbsp;</span></li><li class="alt" style="padding-top: 0px !important; padding-right: 3px !important; padding-bottom: 0px !important; padding-left: 14px; margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: decimal-leading-zero; list-style-position: outside !important; list-style-image: initial; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: rgb(0, 0, 0); line-height: 24px; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-image: url(http://images.51cto.com/images/art0910/AppData/Roaming/Adobe/Dreamweaver%20CS4/zh_CN/Configuration/images/dt1.gif); background-position: initial initial; background-repeat: no-repeat no-repeat; "><span style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: black; background-color: inherit; ">&nbsp;&nbsp;&nbsp;&nbsp;Public&nbsp;Property&nbsp;MyStringProperty&nbsp;As&nbsp;String &nbsp;</span></li><li style="padding-top: 0px !important; padding-right: 3px !important; padding-bottom: 0px !important; padding-left: 14px; margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: decimal-leading-zero; list-style-position: outside !important; list-style-image: initial; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: rgb(0, 0, 0); line-height: 24px; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-image: url(http://images.51cto.com/images/art0910/AppData/Roaming/Adobe/Dreamweaver%20CS4/zh_CN/Configuration/images/dt1.gif); background-position: initial initial; background-repeat: no-repeat no-repeat; "><span style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: black; background-color: inherit; ">&nbsp;&nbsp;&nbsp;&nbsp;Get &nbsp;</span></li><li class="alt" style="padding-top: 0px !important; padding-right: 3px !important; padding-bottom: 0px !important; padding-left: 14px; margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: decimal-leading-zero; list-style-position: outside !important; list-style-image: initial; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: rgb(0, 0, 0); line-height: 24px; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-image: url(http://images.51cto.com/images/art0910/AppData/Roaming/Adobe/Dreamweaver%20CS4/zh_CN/Configuration/images/dt1.gif); background-position: initial initial; background-repeat: no-repeat no-repeat; "><span style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: black; background-color: inherit; ">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="attribute" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: red; background-color: inherit; "><font color="#ff0000" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">MyStringProperty</font></span><span style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: black; background-color: inherit; ">&nbsp;=&nbsp;</span><span class="attribute-value" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: blue; background-color: inherit; "><font color="#0000ff" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">msMyStringProperty</font></span><span style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: black; background-color: inherit; ">&nbsp;</span></li><li style="padding-top: 0px !important; padding-right: 3px !important; padding-bottom: 0px !important; padding-left: 14px; margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: decimal-leading-zero; list-style-position: outside !important; list-style-image: initial; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: rgb(0, 0, 0); line-height: 24px; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-image: url(http://images.51cto.com/images/art0910/AppData/Roaming/Adobe/Dreamweaver%20CS4/zh_CN/Configuration/images/dt1.gif); background-position: initial initial; background-repeat: no-repeat no-repeat; "><span style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: black; background-color: inherit; ">&nbsp;&nbsp;&nbsp;&nbsp;End&nbsp;Get &nbsp;</span></li><li class="alt" style="padding-top: 0px !important; padding-right: 3px !important; padding-bottom: 0px !important; padding-left: 14px; margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: decimal-leading-zero; list-style-position: outside !important; list-style-image: initial; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: rgb(0, 0, 0); line-height: 24px; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-image: url(http://images.51cto.com/images/art0910/AppData/Roaming/Adobe/Dreamweaver%20CS4/zh_CN/Configuration/images/dt1.gif); background-position: initial initial; background-repeat: no-repeat no-repeat; "><span style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: black; background-color: inherit; ">&nbsp;</span></li><li style="padding-top: 0px !important; padding-right: 3px !important; padding-bottom: 0px !important; padding-left: 14px; margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: decimal-leading-zero; list-style-position: outside !important; list-style-image: initial; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: rgb(0, 0, 0); line-height: 24px; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-image: url(http://images.51cto.com/images/art0910/AppData/Roaming/Adobe/Dreamweaver%20CS4/zh_CN/Configuration/images/dt1.gif); background-position: initial initial; background-repeat: no-repeat no-repeat; "><span style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: black; background-color: inherit; ">&nbsp;&nbsp;&nbsp;&nbsp;Set &nbsp;</span></li><li class="alt" style="padding-top: 0px !important; padding-right: 3px !important; padding-bottom: 0px !important; padding-left: 14px; margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: decimal-leading-zero; list-style-position: outside !important; list-style-image: initial; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: rgb(0, 0, 0); line-height: 24px; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-image: url(http://images.51cto.com/images/art0910/AppData/Roaming/Adobe/Dreamweaver%20CS4/zh_CN/Configuration/images/dt1.gif); background-position: initial initial; background-repeat: no-repeat no-repeat; "><span style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: black; background-color: inherit; ">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="attribute" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: red; background-color: inherit; "><font color="#ff0000" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">msMyStringProperty</font></span><span style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: black; background-color: inherit; ">&nbsp;=&nbsp;MyStringProperty &nbsp;</span></li><li style="padding-top: 0px !important; padding-right: 3px !important; padding-bottom: 0px !important; padding-left: 14px; margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: decimal-leading-zero; list-style-position: outside !important; list-style-image: initial; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: rgb(0, 0, 0); line-height: 24px; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-image: url(http://images.51cto.com/images/art0910/AppData/Roaming/Adobe/Dreamweaver%20CS4/zh_CN/Configuration/images/dt1.gif); background-position: initial initial; background-repeat: no-repeat no-repeat; "><span style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: black; background-color: inherit; ">&nbsp;&nbsp;&nbsp;&nbsp;End&nbsp;Set &nbsp;</span></li><li class="alt" style="padding-top: 0px !important; padding-right: 3px !important; padding-bottom: 0px !important; padding-left: 14px; margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: decimal-leading-zero; list-style-position: outside !important; list-style-image: initial; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: rgb(0, 0, 0); line-height: 24px; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-image: url(http://images.51cto.com/images/art0910/AppData/Roaming/Adobe/Dreamweaver%20CS4/zh_CN/Configuration/images/dt1.gif); background-position: initial initial; background-repeat: no-repeat no-repeat; "><span style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: black; background-color: inherit; ">&nbsp;&nbsp;&nbsp;&nbsp;End&nbsp;Property &nbsp;</span></li><li style="padding-top: 0px !important; padding-right: 3px !important; padding-bottom: 0px !important; padding-left: 14px; margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: decimal-leading-zero; list-style-position: outside !important; list-style-image: initial; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: rgb(0, 0, 0); line-height: 24px; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-image: url(http://images.51cto.com/images/art0910/AppData/Roaming/Adobe/Dreamweaver%20CS4/zh_CN/Configuration/images/dt1.gif); background-position: initial initial; background-repeat: no-repeat no-repeat; "><span style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: black; background-color: inherit; ">&nbsp;</span></li></ol></pre>
    <p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; text-indent: 28px; ">VB.NET不再有Let属性过程，因为所有赋值语句的语法（无论是对象还是非对象）都已经一样。</p>
    <p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; text-indent: 28px; ">语言方面的改动远远超过了对体系结构的改动。对于大多数人来说这些改动都有意义，但仍有人对某些改动存有异议。例如，在以前的版本中，许多任务可以用多种不同的方法完成，统一的编码标准要么不存在，要么很难执行。为了&ldquo;清理&rdquo;VB语言，Microsoft对VB作了一些重大的改动，许多以前可以有多种实现方法的任务现在只有一种方法。</p>
    <p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; text-indent: 28px; ">除了前面几个表格列出的内容之外，下面是一些特别需要注意的地方。</p>
    <p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; text-indent: 28px; ">首先，向过程参数传递数据的默认方式由原来的传递引用（ByRef）变成了传递值（ByVal），这是一个很重要的改动。通过引用传递参数比通过值传递参数面临着更多的危险，这种危险在于被调用过程可能无意地改变参数的值。VB.NET仍旧允许以引用方式传递参数，但默认参数传递方式的改变意味着程序必须作相应的调整。</p>
    <p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; text-indent: 28px; ">第二，VB.NET中不再有Set语句，把对象引用赋给变量现在只需一个等号就可以了，对象可以象任何其他值一样对待。虽然省略Set简化了代码，但也有一个附带的影响：默认属性不再有效。</p>
    <p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; text-indent: 28px; ">例如，下面这种属性值引用方法不再合法：</p>
    <p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; text-indent: 28px; ">Text1 = &quot;这是对象的默认属性值。&quot;</p>
    <p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; text-indent: 28px; ">相反，属性值必须按照如下方式显式引用：</p>
    <p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; text-indent: 28px; ">Text1.Text = &quot;这是对象的默认属性值。&quot;</p>
    <p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; text-indent: 28px; ">从表面上看来，VB.NET作这种要求似乎没有必要。但事实上，它对于摆脱默认属性来说却是必要的。例如，假设有一个名字为objFoo的对象变量，由于没有了Set语句，假若属性值仍旧可以象原来一样引用，下面这个语句到底是什么意思就很难确定了：&nbsp;</p>
    <pre style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; font-family: 'Courier New', monospace; font-size: 12px; width: 584px; overflow-x: auto; overflow-y: auto; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: rgb(230, 230, 230); background-position: initial initial; background-repeat: initial initial; "><ol class="dp-xml" style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 20px; margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 1px !important; margin-left: 3em !important; list-style-type: decimal; list-style-position: initial; list-style-image: initial; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: rgb(0, 0, 0); background-image: url(http://images.51cto.com/images/art0910/images/010101bg.gif); background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; line-height: 30px; background-position: initial initial; background-repeat: no-repeat repeat; "><li class="alt" style="padding-top: 0px !important; padding-right: 3px !important; padding-bottom: 0px !important; padding-left: 14px; margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; list-style-type: decimal-leading-zero; list-style-position: outside !important; list-style-image: initial; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: rgb(0, 0, 0); line-height: 24px; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-image: url(http://images.51cto.com/images/art0910/AppData/Roaming/Adobe/Dreamweaver%20CS4/zh_CN/Configuration/images/dt1.gif); background-position: initial initial; background-repeat: no-repeat no-repeat; "><span style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: black; background-color: inherit; "><span class="attribute" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: red; background-color: inherit; "><font color="#ff0000" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">objFoo</font></span><span style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: black; background-color: inherit; ">&nbsp;=&nbsp;</span><span class="attribute-value" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: blue; background-color: inherit; "><font color="#0000ff" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Text1</font></span><span style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; color: black; background-color: inherit; ">&nbsp;</span></span></li></ol></pre>
    <p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; text-indent: 28px; ">这个语句是设置了一个对Text1的引用，还是把Text1的Text属性值赋给了objFoo？我们无法作出判断，编译器也同样不能判断。因此，抛弃Set语句也就意味着必须放弃默认属性值。</p>
    <p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; text-indent: 28px; ">NET中最不让人喜欢的改动：Microsoft改变了一些早就在使用的数据类型的含义。在。NET中，Integer变成了32位，而Long则是64位。可以想象，这种改变将导致程序员频繁地用错变量类型。例如，调用某个API函数时应该使用16位的Integer还是使用32位的Integer？但愿Microsoft能够重新考虑这个决定，采用一些新的变量类型名字，如Int32和Long64.</p>
    <p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; text-indent: 28px; ">VB.NET引入了Option Strict关键词。Option Strict关键词用于替代Option Explicit.原来的VB允许把一个数字值赋给字符串变量，或者进行其它类似的不正常赋值操作，Option Strict结束了这种情况。声明Option Strict告诉Visual Basic.NET不要进行任何强制的类型转换。当然，VB.NET也不是完全限制了类型自动转换：它允许进行向下的自动类型转换（Cast），但不支持向上的自动类型转换。例如，如果不是使用&ldquo;sngvariable = CSng（dblvariable）&rdquo;这类语句进行显式的类型转换，声明为Single的变量不能设置为Double变量的值，因为它可能导致数据丢失；然而，Double变量可以直接设置为Single类型变量的值，且无需显式地进行类型转换，因为这里不存在数据丢失问题。使用Option Strict能够帮助开发者减少许多错误，包括许多难以调试的错误。附带说明：使用Option Strict时不允许再使用延迟绑定。</p>
    <p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; text-indent: 28px; ">本文主要简单介绍了VB.NET语法的一些使用以及注意事项，希望对大家的学习带来收益。</p>
</ul>
</span></p>]]></description>
		</item>
		
			<item>
			<link>https://blog.imwebs.com/article.asp?id=555</link>
			<title><![CDATA[.NET 命名空间介绍]]></title>
			<author>webmaster@imwebs.com(Admin)</author>
			<category><![CDATA[dotNet]]></category>
			<pubDate>Mon,14 Mar 2011 00:42:52 +0800</pubDate>
			<guid>https://blog.imwebs.com/default.asp?id=555</guid>
		<description><![CDATA[Microsoft.CSharp <br/>包含支持用 C# 语言进行编译和代码生成的类。 <br/><br/>Microsoft.Jscri&#112;t <br/>包含支持用 Jscri&#112;t 语言进行编译和代码生成的类。 <br/><br/>Microsoft.VisualBasic <br/>包含支持用 Visual Basic .NET 语言进行编译和代码生成的类。 <br/><br/>Microsoft.Vsa <br/>包含使您可以将 .NET Framework 脚本引擎的脚本集成到应用程序中以及在运行时编译和执行代码的接口。 <br/><br/>Microsoft.Win32 <br/>提供两种类型的类：处理由操作系统引发的事件的类和对系统注册表进行操作的类。 <br/><br/>System <br/>包含用于定义常用值和引用数据类型、事件和事件处理程序、接口、属性和处理异常的基础类和基类。 <br/>其他类提供支持下列操作的服务：数据类型转换，方法参数操作，数学计算，远程和本地程序调用，应用程序环境管理以及对托管和非托管应用程序的监管。<br/><br/>System.CodeDom <br/>包含可用于表示源代码文档的元素和结构的类。这些元素可用于建立源代码文档的结构。通过使用 System.CodeDom.Compiler 命名空间所提供的功能，可以将源代码文档输出为用受支持的语言编写的源代码。 <br/><br/>System.CodeDom.Compiler <br/>包含用于管理用受支持的编程语言生成和编译源代码的类型。每个代码生成器可根据“代码文档对象模型”(CodeDOM) 源代码模型的结构（由 System.CodeDom 命名空间所提供的元素组成），用特定的某种编程语言生成源代码。 <br/><br/>System.Collections <br/>包含定义各种对象集合（如列表、队列、位数组、哈希表和字典）的接口和类。 <br/><br/>System.Collections.Specialized <br/>包含专用的强类型集合；例如，链接表词典、位向量以及只包含字符串的集合。 <br/><br/>System.ComponentModel <br/>提供用于实现组件和控件的运行时和设计时行为的类。此命名空间包括用于属性和类型转换器的实现、数据源绑定和组件授权的基类和接口。 <br/><br/>System.ComponentModel.Design <br/>包含可由开发人员用来生成自定义设计时组件行为和在设计时配置组件的用户界面的类。设计时环境提供了使开发人员能够安排组件并配置它们的属性的系统。 <br/><br/>System.ComponentModel.Design.Serialization <br/>提供支持在设计时自定义和控制序列化的类型。 <br/><br/>System.Configuration <br/>提供使您可以以编程方式访问 .NET Framework 配置设置和处理配置文件（.config 文件）中的错误的类和接口。 <br/><br/>System.Configuration.Assemblies <br/>包含用于配置程序集的类。 <br/><br/>System.Configuration.Install <br/>提供使您可以为自己的组件编写自定义安装程序的类。Installer 类是 .NET Framework 中所有自定义安装程序的基类。 <br/><br/>System.Data <br/>基本上由构成 ADO.NET 结构的类组成。ADO.NET 结构使您可以生成可用于有效管理多个数据源中的数据的组件。在断开连接的方案（如 Internet）中，ADO.NET 提供了一些可以在多层系统中请求、更新和协调数据的工具。ADO.NET 结构也可以在客户端应用程序（如 Windows 窗体）或 ASP.NET 创建的 HTML 页中实现。 <br/><br/>System.Data.Common <br/>包含由 .NET Framework 数据提供程序共享的类。.NET Framework 数据提供程序描述用于在托管空间中访问数据源（如数据库）的类的集合。 <br/><br/>System.Data.Odbc <br/>封装 ODBC .NET Framework 数据提供程序。.NET Framework 数据提供程序描述用于在托管空间中访问数据源（如数据库）的类的集合。通过使用 OdbcDataAdapter 类，可以填充驻留在内存中的 DataSet，使用它可以查询和更新数据源。 <br/>有关如何使用此命名空间的其他信息，请参见 OdbcDataReader、OdbcCommand 和 OdbcConnection 类。<br/>注意：该命名空间仅在 .NET Framework 1.1 版中受支持。<br/><br/>System.Data.OleDb <br/>封装 OLE DB .NET Framework 数据提供程序。OLE DB .NET Framework 数据提供程序描述了用于在托管空间中访问 OLE DB 数据源的类集合。 <br/>System.Data.OracleClient <br/>封装 o&#114;acle .NET Framework 数据提供程序。Oracle .NET Framework 数据提供程序描述了用于在托管空间中访问 o&#114;acle 数据源的类集合。 <br/>注意：该命名空间仅在 .NET Framework 1.1 版中受支持。<br/><br/>System.Data.SqlClient <br/>封装 SQL Server .NET Framework 数据提供程序。SQL Server .NET Framework 数据提供程序描述了用于在托管空间中访问 SQL Server 数据库的类集合。 <br/>System.Data.SqlServerCE <br/>描述可用于在托管环境下从基于 Windows CE 的设备访问 SQL Server CE 中的数据库的类集合。通过此命名空间，可以在一个设备上创建 SQL Server CE 数据库，并且可以与另一个设备或远程服务器上的 SQL Server 数据库建立连接。 <br/>注意：该命名空间仅在 .NET Framework 1.1 版中受支持。<br/><br/>System.Data.SqlTypes <br/>提供用于 SQL Server 中的本机数据类型的类。这些类提供了其他数据类型的更安全、更快速的替代物。使用此命名空间中的类有助于防止在可能发生精度损失的情况中出现的类型转换错误。由于其他数据类型与 SqlTypes 在后台相互转换，因此在此命名空间内显式创建和使用对象同样会产生较快的代码。 <br/><br/>System.Diagnostics <br/>提供允许与系统进程、事件日志和性能计数器进行交互的类。此命名空间还提供了使您可以调试应用程序和跟踪代码执行的类。有关更多信息，请参见 Trace 和 Debug 类。<br/> <br/>System.Diagnostics.SymbolStore <br/>提供使您可以读取和写入调试符号信息（如 Microsoft 中间语言 (MSIL) 映射的源行）的类。面向 .NET Framework 的编译器可以将调试符号信息存储到程序员的数据库 (PDB) 文件中。调试器和代码分析器工具可以在运行时读取调试符号信息。 <br/><br/>System.DirectoryServices <br/>提供从托管代码轻松访问 Active Directory 的方法。此命名空间包含两个组件类：DirectoryEntry 和 DirectorySearcher。这两个类使用 Active Directory 服务接口 (ADSI) 技术。ADSI 是由 Microsoft 提供的一组接口，是一种可灵活处理各种网络提供程序的工具。ADSI 使管理员能够相对轻松地查找和管理网络资源，不论网络规模有多大。 <br/><br/>System.Drawing <br/>提供对 GDI+ 基本图形功能的访问。System.Drawing.Drawing2D、System.Drawing.Imaging 和 System.Drawing.Text 命名空间提供了更高级的功能。 <br/><br/>System.Drawing.Design <br/>包含扩展设计时用户界面 (UI) 逻辑和绘制的类。可以进一步扩展此设计时功能来创建以下对象：自定义工具箱项，类型特定的值编辑器或类型转换器，其中类型特定的值编辑器用于编辑和以图形方式表示所支持的类型的值；类型转换器用于在特定的类型之间转换值。此命名空间提供了开发设计时用户界面扩展的基本框架。 <br/><br/>System.Drawing.Drawing2D <br/>提供高级的二维和向量图形功能。此命名空间包括渐变画笔、Matrix 类（用于定义几何转换）和 GraphicsPath 类。 <br/><br/>System.Drawing.Imaging <br/>提供高级的 GDI+ 图像处理功能。基本图形功能由 System.Drawing 命名空间提供。 <br/><br/>System.Drawing.Printing <br/>提供与打印相关的服务。通常情况下，您可以创建 PrintDocument 类的实例，设置描述打印内容的属性，然后调用 Print 方法实际打印文档。 <br/><br/>System.Drawing.Text <br/>提供高级的 GDI+ 版式功能。基本图形功能由 System.Drawing 命名空间提供。此命名空间中的类使用户可以创建和使用字体集合。 <br/><br/>System.EnterpriseServices <br/>为企业级应用程序提供重要的基础结构。COM+ 为企业级环境中部署的组件编程模型提供服务结构。此命名空间为 .NET Framework 对象提供了对 COM+ 服务的访问，从而使 .NET Framework 对象更适用于企业级应用程序。 <br/><br/>System.EnterpriseServices.CompensatingResourceManager <br/>提供使您可以在托管代码中使用补偿资源管理器 (CRM) 的类。CRM 是由 COM+ 提供的一项服务，它使您可以在 Microsoft 分布式事务处理协调器 (DTC) 事务中包括非事务性对象。虽然 CRM 不提供完整资源管理器的功能，但它们却通过恢复日志提供事务性原子性（全有或全无行为）和持久性。 <br/><br/>System.EnterpriseServices.Internal <br/>提供 COM+ 服务的基础结构支持。此命名空间中的类和接口专门用于支持从非托管 COM+ 类调入 System.EnterpriseServices。 <br/><br/>System.Globalization <br/>包含定义区域性相关信息的类，这些信息包括语言、国家/地区、正在使用的日历、日期的格式模式、货币、数字以及字符串的排序顺序。这些类对于编写全球化（国际化）应用程序很有用。 <br/><br/>System.IO <br/>包含允许对数据流和文件进行同步和异步读写的类型。 <br/><br/>System.IO.IsolatedStorage <br/>包含允许创建和使用独立存储区的类型。通过使用这些存储区，可以读写入受信任程度较小的代码无法访问的数据，并且可以防止公开可保存在文件系统中其他位置的敏感信息。数据存储在独立于当前用户和代码所在的程序集的数据舱中。 <br/><br/>System.Management <br/>提供对一组丰富的管理信息和管理事件（它们是关于符合 Windows Management Instrumentation (WMI) 基础结构的系统、设备和应用程序的）的访问。 <br/><br/>System.Management.Instrumentation <br/>提供在规范应用程序管理并通过 WMI 向潜在使用者公开管理信息和事件时必需的类。这样，Microsoft Application Center 或 Microsoft Operations Manager 等使用者就可以轻松地管理您的应用程序，而管理员脚本或其他应用程序（托管应用程序和非托管应用程序）也可以监视和配置您的应用程序。 <br/><br/>System.Messaging <br/>提供使您可以连接、监视和管理网络上的消息队列以及发送、接收或查看消息的类。 <br/><br/>System.Net <br/>为当前网络采用的多种协议提供简单的编程接口。WebRequest 和 WebResponse 类构成了所谓的可插接式协议的基础，该协议是一种网络服务的实现，它使您可以开发使用 Internet 资源的应用程序，而不必考虑各个协议的具体细节。 <br/><br/>System.Net.Sockets <br/>为需要严格控制网络访问的开发人员提供 Windows 套接字 (Winsock) 接口的托管实现。 <br/><br/>System.Reflection <br/>包含提供已加载类型、方法和字段的托管视图的类和接口，并具有动态创建和调用类型的能力。 <br/><br/>System.Reflection.Emit <br/>包含允许编译器或工具发出元数据和 Microsoft 中间语言 (MSIL) 并在磁盘上生成 PE 文件（可选）的类。这些类的主要客户端是脚本引擎和编译器。 <br/><br/>System.Resources <br/>提供允许开发人员创建、存储和管理应用程序中使用的各种区域性特定资源的类和接口。 <br/><br/>System.Runtime.CompilerServices <br/>为使用托管代码的编译器编写器提供功能，以在影响公共语言运行库的运行时行为的元数据中指定属性。此命名空间中的类只用于编译器编写器。 <br/><br/>System.Runtime.InteropServices <br/>提供各种支持 COM Interop 和平台调用服务的成员。如果对这些服务不熟悉，请参见与非托管代码交互操作。 <br/><br/>System.Runtime.InteropServices.CustomMarshalers <br/>支持 .NET 基础结构，不在代码中直接使用。 <br/><br/>System.Runtime.InteropServices.Expando <br/>包含 IExpando 接口，此接口允许通过添加或移除对象的成员来修改对象。 <br/><br/>System.Runtime.Remoting <br/>提供允许开发人员创建和配置分布式应用程序的类和接口。 <br/><br/>System.Runtime.Remoting.Activation <br/>提供支持服务器和客户端远程对象激活的类和对象。 <br/><br/>System.Runtime.Remoting.Channels <br/>包含支持和处理信道和信道接收器的类，这些信道和信道接收器在客户端对远程对象调用方法时用作传输媒介。 <br/><br/>System.Runtime.Remoting.Channels.Http <br/>包含使用 HTTP 协议与远程位置之间相互传输消息和对象的信道。默认情况下，HTTP 信道以 SOAP 格式对对象和方法调用进行编码以便传输，但在信道的配置属性中也可以指定其他编码和解码格式化程序接收器。 <br/><br/>System.Runtime.Remoting.Channels.Tcp <br/>包含使用 TCP 协议与远程位置之间相互传输消息和对象的信道。默认情况下，TCP 信道以二进制格式对对象和方法调用进行编码以便传输，但在信道的配置属性中也可以指定其他编码和解码格式化程序接收器。 <br/><br/>System.Runtime.Remoting.Contexts <br/>包含定义所有对象所驻留的上下文的对象。上下文是一个有序的属性序列，用于定义其中的对象所处的环境。上下文是在对象的激活过程中创建的，这些对象被配置为要求某些自动服务，如同步、事务、实时 (JIT) 激活、安全性等。多个对象可以存留在一个上下文内。 <br/><br/>System.Runtime.Remoting.Lifetime <br/>包含管理远程对象生存期的类。传统上，分布式垃圾回收功能使用引用计数和 Ping 来控制对象的生存期。这种机制在每一项服务只有较少的客户端时可以正常工作，但是当每一项服务有几千个客户端时就不能正常工作了。远程处理生存期服务将每一项服务与一个租约关联，当租约到期时，就会删除该服务。生存期服务可以起到传统的分布式垃圾回收器的作用，并且当每一项服务的客户端数量增加时也能很好地调整。 <br/><br/>System.Runtime.Remoting.Messaging <br/>包含用于创建和远程处理消息的类。远程处理基础结构使用消息与远程对象进行通信。消息用于传输远程方法调用、激活远程对象和交流信息。消息对象携带一组命名属性，其中包括操作标识符、代表信息和参数。 <br/><br/>System.Runtime.Remoting.Metadata <br/>包含可用于为对象和字段自定义 SOAP 的生成和处理的类和属性。此命名空间中的类可用于指示 SOAPAction、类型输出、XML 元素名和 XML 命名空间 URI 方法。 <br/><br/>System.Runtime.Remoting.Metadata.W3cXsd2001 <br/>包含由万维网联合会 (W3C) 在 2001 年定义的 XML 架构定义 (XSD)。W3C 中的“XML Schema Part2: Data types”（XML 架构第二部分：数据类型）规范确定了各种数据类型的格式和行为。此命名空间包含符合 W3C 规范的数据类型的包装类。所有日期和时间类型都符合 ISO 标准规范。 <br/><br/>System.Runtime.Remoting.MetadataServices <br/>包含由 Soapsuds.exe 命令行工具和用户代码用来在元数据和远程处理基础结构的 XML 架构之间相互转换的类。 <br/><br/>System.Runtime.Remoting.Proxies <br/>包含控制和提供代理功能的类。代理是作为远程对象映像的本地对象。代理使客户端可以跨远程处理边界访问对象。 <br/><br/>System.Runtime.Remoting.Services <br/>包含为 .NET Framework 提供功能的服务类。 <br/><br/>System.Runtime.Serialization <br/>包含可用于序列化和反序列化对象的类。序列化是将对象或对象图转换为线性的字节序列以存储或传输到其他位置的过程。反序列化是接受存储的信息并用这些信息重新创建对象的过程。 <br/>System.Runtime.Serialization.Formatters <br/>提供由序列化格式化程序使用的通用枚举、接口和类。 <br/><br/>System.Runtime.Serialization.Formatters.Binary <br/>包含可用于以二进制格式序列化和反序列化对象的 BinaryFormatter 类。 <br/><br/>System.Runtime.Serialization.Formatters.Soap <br/>包含可用于以 SOAP 格式序列化和反序列化对象的 SoapFormatter 类。 <br/><br/>System.Security <br/>提供 .NET Framework 安全系统的基础结构，包括权限的基类。 <br/><br/>System.Security.Cryptography <br/>提供加密服务，包括数据的安全编码和解码，以及其他许多操作，如哈希处理、随机数生成和消息身份验证。 <br/><br/>System.Security.Cryptography.X509Certificates <br/>包含 Authenticode X.509 v.3 证书的公共语言运行库实现。此证书用唯一明确标识证书持有者的私钥签名。 <br/><br/>System.Security.Cryptography.XML <br/>包含支持创建和验证 XML 数字签名的类。此命名空间中的类贯彻了万维网联合会 (W3C) 建议“XML-Signature Syntax and Processing”（XML 签名语法和处理），详见 <a href="http://www.w3.org/TR/xmldsig-core/" target="_blank" rel="external">http://www.w3.org/TR/xmldsig-core/</a>。 <br/><br/>System.Security.Permissions <br/>定义根据策略控制操作和资源访问的类。 <br/><br/>System.Security.Policy <br/>包含代码组、成员条件和证据。这三种类型的类用于创建由 .NET Framework 安全策略系统应用的规则。证据类是安全策略的输入，成员条件是开关；二者共同创建策略语句并确定授予的权限集。策略级别和代码组是策略层次的结构。代码组是规则的封装并且在策略级别中分层排列。 <br/><br/>System.Security.Principal <br/>定义表示运行代码的安全上下文的主体对象。 <br/><br/>System.ServiceProcess <br/>提供使您可以实现、安装和控制 Windows 服务应用程序的类。服务是不需要用户界面长期运行的可执行文件。实现服务的过程包括：从 ServiceBase 类继承，定义在传入启动、停止、暂停和继续命令时处理的特定行为，以及定义当系统关闭时所采取的自定义行为和操作。 <br/><br/>System.Text <br/>包含表示 ASCII、Unicode、UTF-7 和 UTF-8 字符编码的类；用于在字符块和字节块之间相互转换的抽象基类；以及不需要创建字符串的中间实例就可以操作和格式化字符串对象的帮助器类。 <br/><br/>System.Text.RegularExpressions <br/>包含提供对 .NET Framework 正则表达式引擎的访问的类。此命名空间提供的正则表达式功能可在 Microsoft .NET Framework 中运行的任何平台或语言上使用。 <br/><br/>System.Threading <br/>提供支持多线程编程的类和接口。除了用于同步线程活动和数据访问的类（Mutex、Monitor、Interlocked、AutoResetEvent 等）外，此命名空间还包括一个 ThreadPool 类（使您可以使用系统提供的线程池）和一个 Timer 类（对线程池中的线程执行回调方法）。 <br/><br/>System.Timers <br/>提供允许以指定的间隔引发事件的 Timer 组件。 <br/><br/>System.web <br/>提供支持浏览器/服务器通信的类和接口。此命名空间包括 HTTPRequest 类（它提供有关当前 HTTP 请求的大量信息），HTTPResponse 类（它管理 HTTP 到客户端的输出）和 HTTPServerUtility 对象（它提供对服务器端实用工具和进程的访问）。System.Web 还包括用于 Cookie 操作、文件传输、异常信息和输出缓存控制的类。 <br/><br/>System.Web.Caching <br/>提供用于在服务器上缓存常用数据的类。其中包括 Cache 类，该类是一个字典，您可以在其中存储任意数据对象，如哈希表和数据集。它还为这些对象提供了失效功能，并为您提供了添加和移除这些对象的方法。您也可以添加依赖于其他文件或缓存项的对象，并在某个对象从 Cache 中被移除时执行回调以通知您的应用程序。 <br/><br/>System.Web.Configuration <br/>包含用于设置 ASP.NET 配置的类。 <br/><br/>System.Web.Hosting <br/>提供从 Microsoft Internet 信息服务 (IIS) 的外部托管应用程序承载 ASP.NET 应用程序的功能。 <br/><br/>System.Web.Mail <br/>包含使您能够使用 CDOSYS 消息组件构造和发送消息的类。邮件消息通过 Microsoft Windows 2000 中内置的 SMTP 邮件服务或任意的 SMTP 服务器发送。此命名空间中的类可从 ASP.NET 或任何托管应用程序中使用。 <br/><br/>System.Web.Mobile <br/>包含生成 ASP.NET 移动 Web 应用程序所需的核心功能，其中包括身份验证和错误处理。 <br/><br/>System.Web.Security <br/>包含用于在 Web 服务器应用程序中实现 ASP.NET 安全的类。 <br/><br/>System.Web.Services <br/>包含使您可以利用 ASP.NET 和 XML Web services 客户端来创建 XML Web services 的类。XML Web services 是一些应用程序，它们提供了在使用标准协议（如 HTTP、XML、XSD、SOAP 和 WSDL）的松耦合环境下进行消息交换的能力。利用 XML Web services，可以在异质环境下的公司内部和公司之间生成模块化应用程序，使它们与各种各样的实现、平台和设备交互操作。这些应用程序基于 SOAP 的 XML 消息的各部分可以是严格定义的（结构化和类型化）或松散定义的（使用任意 XML）。这些消息能够随时间而发展，并且不会破坏协议，这种能力对于作为未来 Web 构造块的 XML Web services 的灵活性和可靠性来说是最根本的。 <br/><br/>System.Web.Services.Configuration <br/>由一些类组成，这些类配置用 ASP.NET 创建的 XML Web services 的运行方式。 <br/><br/>System.Web.Services.Description <br/>由一些类组成，这些类使您能够使用 Web 服务描述语言 (WSDL) 公开描述 XML Web services。此命名空间中的每个类对应于 WSDL 规范中的一个特定元素，并且类层次结构对应于有效的 WSDL 文档的 XML 结构。 <br/><br/>System.Web.Services.Discovery <br/>由一些类组成，这些类允许 XML Web services 客户端通过称为“XML Web services 发现”的进程来定位 Web 服务器上可用的 XML Web services。<br/> <br/>System.Web.Services.Protocols <br/>由一些类组成，这些类定义用于在通信期间通过网络在 XML Web services 客户端和用 ASP.NET 创建的 XML Web services 之间传输数据的协议。<br/> <br/>System.Web.SessionState <br/>提供支持在服务器上存储特定于 Web 应用程序中的单个客户端的数据的类和接口。会话状态数据用于向客户端提供与应用程序的持久连接的外观。状态信息可以存储在本地进程内存中，或者，对于网络场配置来说，可以使用 ASP.NET 状态服务或 SQL Server 数据库将状态信息存储在进程外。 <br/><br/>System.Web.UI <br/>提供使您可以创建以 Web 页上的用户界面形式出现在 Web 应用程序中的控件和页的类和接口。此命名空间包括 Control 类，该类为所有控件（不论是 HTML 控件、Web 控件还是用户控件）提供一组通用功能。它还包括 Page 控件，每当对 Web 应用程序中的页发出请求时，都会自动生成此控件。另外还提供了一些类，这些类提供 Web 窗体服务器控件数据绑定功能、保存给定控件或页的视图状态的能力，以及对可编程控件和文本控件都适用的分析功能。 <br/><br/>System.Web.UI.Design <br/>包含可用于扩展 Web 窗体设计时支持的类。 <br/><br/>System.Web.UI.Design.WebControls <br/>包含可用于扩展 Web 服务器控件设计时支持的类。 <br/><br/>System.Web.UI.HtmlControls <br/>包含使您可以在 Web 窗体页上创建 HTML 服务器控件的类集合。HTML 服务器控件运行在服务器上，并且直接映射到大多数浏览器所支持的标准 HTML 标记。这使您能够以编程方式控制 Web 窗体页上的 HTML 元素。 <br/><br/>System.Web.UI.MobileControls <br/>包含一组 ASP.NET 服务器控件，这些控件可以针对不同的移动设备智能地呈现您的应用程序。 <br/><br/>System.Web.UI.MobileControls.Adapters <br/>包含由 ASP.NET 移动控件用来自定义设备和支持扩展设备的核心设备适配器类。 <br/><br/>System.Web.UI.WebControls <br/>包含使您可以在 Web 页上创建 Web 服务器控件的类。Web 服务器控件运行在服务器上，并且包括按钮和文本框等窗体控件。它们还包括类似于日历的特殊控件。由于 Web 服务器控件运行在服务器上，因此可以以编程方式来控制这些元素。Web 服务器控件比 HTML 服务器控件更抽象。它们的对象模型不一定反映 HTML 语法。<br/> <br/>System.Windows.Forms <br/>包含用于创建基于 Windows 的应用程序的类，这些应用程序可以充分利用 Microsoft Windows 操作系统中的丰富用户界面功能。 <br/><br/>System.Windows.Forms.Design <br/>包含支持 Windows 窗体组件的设计时配置和行为的类。这些类包括：提供 Windows 窗体组件（即一组设计时服务）支持的设计器类、用于配置特定属性类型的 UITypeEditor 类，以及用于导入 ActiveX 控件的类。 <br/><br/>System.Xml <br/>提供基于标准的 XML 处理支持。 <br/><br/>System.Xml.Schema <br/>包含提供基于标准的 XML 架构定义语言 (XSD) 架构支持的 XML 类。 <br/><br/>System.Xml.Serialization <br/>包含用于将对象序列化为 XML 格式的文档或流的类。 <br/><br/>System.Xml.XPath <br/>包含 XPath 分析器和计算引擎。它支持 W3C XML 路径语言 (XPath) 1.0 版建议 (www.w3.org/TR/xpath)。 <br/><br/>System.Xml.Xsl <br/>提供可扩展样式表转换 (XSLT) 转换支持。它支持 W3C XSL 转换 (XSLT) 1.0 版建议 (www.w3.org/TR/xslt)。 ]]></description>
		</item>
		
			<item>
			<link>https://blog.imwebs.com/article.asp?id=554</link>
			<title><![CDATA[.Net 常用命名空间和类介绍]]></title>
			<author>webmaster@imwebs.com(Admin)</author>
			<category><![CDATA[dotNet]]></category>
			<pubDate>Mon,14 Mar 2011 00:33:11 +0800</pubDate>
			<guid>https://blog.imwebs.com/default.asp?id=554</guid>
		<description><![CDATA[<table border="0" cellspacing="1" cellpadding="3" style="background: #ccc;">
    <tbody>
        <tr>
            <td bgcolor="#ffffff" valign="top" width="617" colspan="5">
            <div align="center"><strong><span>一、基础命名空间</span></strong></div>
            <hr />
            </td>
        </tr>
        <tr>
            <td bgcolor="#ffffff" width="168">
            <div><span>System.Collections</span></div>
            </td>
            <td bgcolor="#ffffff" width="449" colspan="4">
            <div><span>包含了一些与集合相关的类型<span>,比如列表,队列,位数组,哈希表和字典等.</span></span></div>
            </td>
        </tr>
        <tr>
            <td bgcolor="#ffffff" width="168">
            <div><span>System.IO</span></div>
            </td>
            <td bgcolor="#ffffff" width="449" colspan="4">
            <div><span>包含了一些数据流类型并提供了文件和目录同步异步读写<span>.</span></span></div>
            </td>
        </tr>
        <tr>
            <td bgcolor="#ffffff" width="168">
            <div><span>System.Text</span></div>
            </td>
            <td bgcolor="#ffffff" width="449" colspan="4">
            <div><span>包含了一些表示字符编码的类型并提供了字符串的操作和格式化</span></div>
            </td>
        </tr>
        <tr>
            <td bgcolor="#ffffff" width="168">
            <div><span>System.Reflection</span></div>
            </td>
            <td bgcolor="#ffffff" width="449" colspan="4">
            <div><span>包括了一些提供加载类型<span>,方法和字段的托管视图以及动态创建和调用类型功能的类型.</span></span></div>
            </td>
        </tr>
        <tr>
            <td bgcolor="#ffffff" width="168">
            <div><span>System.Threading</span></div>
            </td>
            <td bgcolor="#ffffff" width="449" colspan="4">
            <div><span>提供启用多线程的类和接口</span></div>
            </td>
        </tr>
        <tr>
            <td bgcolor="#ffffff" valign="top" width="617" colspan="5">
            <div align="center"><strong><span>二、图形命名空间</span></strong></div>
            <hr />
            </td>
        </tr>
        <tr>
            <td bgcolor="#ffffff" width="168">
            <div><span>System.Drawing</span></div>
            </td>
            <td bgcolor="#ffffff" width="449" colspan="4">
            <div><span>这个主要的ＧＤＩ＋命名空间定义了许多类型，实现基本的绘图类型（字体，钢笔，基本画笔等）和无所不能的<span>Graphics对象．</span></span></div>
            </td>
        </tr>
        <tr>
            <td bgcolor="#ffffff" width="168">
            <div><span>System.Drawing2D</span></div>
            </td>
            <td bgcolor="#ffffff" width="449" colspan="4">
            <div><span>这个命名空间提供高级的二维和失量图像功能．</span></div>
            </td>
        </tr>
        <tr>
            <td bgcolor="#ffffff" width="168">
            <div><span>System.Drawing.Imaging</span></div>
            </td>
            <td bgcolor="#ffffff" width="449" colspan="4">
            <div><span>这个命名空间定义了一些类型实现图形图像的操作．</span></div>
            </td>
        </tr>
        <tr>
            <td bgcolor="#ffffff" width="168">
            <div><span>System.Drawing.Text</span></div>
            </td>
            <td bgcolor="#ffffff" width="449" colspan="4">
            <div><span>这个命名空间提供了操作字体集合的功能．</span></div>
            </td>
        </tr>
        <tr>
            <td bgcolor="#ffffff" width="168">
            <div><span>System.Drawing.Printing</span></div>
            </td>
            <td bgcolor="#ffffff" width="449" colspan="4">
            <div><span>这个命名空间定义了一些类型实现在打印纸上绘制图像，和打印机交互以及格式化某个打印任务的总体外观等功能．</span></div>
            </td>
        </tr>
        <tr>
            <td bgcolor="#ffffff" valign="top" width="617" colspan="5">
            <div align="center"><strong><span>三、数据命名空间</span></strong></div>
            <hr />
            </td>
        </tr>
        <tr>
            <td bgcolor="#ffffff" width="168">
            <div><span>System.Data</span></div>
            </td>
            <td bgcolor="#ffffff" width="449" colspan="4">
            <div><span>包含了数据访问使用的一些主要类型．</span></div>
            </td>
        </tr>
        <tr>
            <td bgcolor="#ffffff" width="168">
            <div><span>System.Data.Common</span></div>
            </td>
            <td bgcolor="#ffffff" width="449" colspan="4">
            <div><span>包含了各种数据库访问共享的一些类型．</span></div>
            </td>
        </tr>
        <tr>
            <td bgcolor="#ffffff" width="168">
            <div><span>System.XML</span></div>
            </td>
            <td bgcolor="#ffffff" width="449" colspan="4">
            <div><span>包含了根据标准来支持ＸＭＬ处理的类．</span></div>
            </td>
        </tr>
        <tr>
            <td bgcolor="#ffffff" width="168">
            <div><span>System.Data.OleDb</span></div>
            </td>
            <td bgcolor="#ffffff" width="449" colspan="4">
            <div><span>包含了一些操作<span>OLEDB数据源的类型．</span></span></div>
            </td>
        </tr>
        <tr>
            <td bgcolor="#ffffff" width="168">
            <div><span>System.Data.Sql</span></div>
            </td>
            <td bgcolor="#ffffff" width="449" colspan="4">
            <div><span>能使你枚举安装在当前本地网络的<span>SQL&nbsp;Server实例．</span></span></div>
            </td>
        </tr>
        <tr>
            <td bgcolor="#ffffff" width="168">
            <div><span>System.Data.SqlClient</span></div>
            </td>
            <td bgcolor="#ffffff" width="449" colspan="4">
            <div><span>包含了一些操作<span>MS&nbsp;SQL&nbsp;Server数据库的类型，提供了和&nbsp;System.Data.OleDb相似的功能，但是针对SQL做了优化．</span></span></div>
            </td>
        </tr>
        <tr>
            <td bgcolor="#ffffff" width="168">
            <div><span>System.Data.SqlTypes</span></div>
            </td>
            <td bgcolor="#ffffff" width="449" colspan="4">
            <div><span>提供了一些表示<span>SQL数据类型的类．</span></span></div>
            </td>
        </tr>
        <tr>
            <td bgcolor="#ffffff" width="168">
            <div><span>System.Data.Odbc</span></div>
            </td>
            <td bgcolor="#ffffff" width="449" colspan="4">
            <div><span>包含了操作<span>Odbc数据源的类型．</span></span></div>
            </td>
        </tr>
        <tr>
            <td bgcolor="#ffffff" width="168">
            <div><span>System.Data.OracleClient</span></div>
            </td>
            <td bgcolor="#ffffff" width="449" colspan="4">
            <div><span>包含了操作<span>Odbc数据库的类型．</span></span></div>
            </td>
        </tr>
        <tr>
            <td bgcolor="#ffffff" width="168">
            <div><span>System.Transactions</span></div>
            </td>
            <td bgcolor="#ffffff" width="449" colspan="4">
            <div><span>这个命名空间提供了编写事务性应用程序和资源管理器的一些类．</span></div>
            </td>
        </tr>
        <tr>
            <td bgcolor="#ffffff" valign="top" width="617" colspan="5">
            <div align="center"><strong><span>四、<span>WEB命名空间</span></span></strong></div>
            <hr />
            </td>
        </tr>
        <tr>
            <td bgcolor="#ffffff" width="192" colspan="2">
            <div><span>System.Web</span></div>
            </td>
            <td bgcolor="#ffffff" width="425" colspan="3">
            <div><span>这个命名空间包含启用浏览器<span>/服务器通信的类和接口.这些命名空间类用于管&nbsp;理到客户端的HTTP输出和读取HTTP请求.附加的类则提供了一些功能,用于服&nbsp;务器端的应用程序以及进程,Cookie管理,文件传输,异常信息和输出缓存的控制.</span></span></div>
            </td>
        </tr>
        <tr>
            <td bgcolor="#ffffff" width="192" colspan="2">
            <div><span>System.Web.UI</span></div>
            </td>
            <td bgcolor="#ffffff" width="425" colspan="3">
            <div><span>这个命名空间包含<span>Web窗体的类,包括Page类和用于创建Web用户界面的其&nbsp;他标准类.</span></span></div>
            </td>
        </tr>
        <tr>
            <td bgcolor="#ffffff" width="192" colspan="2">
            <div><span>System.Web.UI.HtmlControls</span></div>
            </td>
            <td bgcolor="#ffffff" width="425" colspan="3">
            <div><span>这个命名空间包含用于<span>HTML特定控件的类,这些控件可以添加到Web窗体中&nbsp;以创建Web用户界面</span></span></div>
            </td>
        </tr>
        <tr>
            <td bgcolor="#ffffff" width="192" colspan="2">
            <div><span>System.Web.UI.WebControls</span></div>
            </td>
            <td bgcolor="#ffffff" width="425" colspan="3">
            <div><span>包含创建<span>ASP.NET服务器控件的类,当添加到窗体时,这些控件将呈现浏览器特&nbsp;定的HTML和脚本,用于创建和设备无关的Web用户界面.</span></span></div>
            </td>
        </tr>
        <tr>
            <td bgcolor="#ffffff" width="192" colspan="2">
            <div><span>System.Web.Mobile</span></div>
            </td>
            <td bgcolor="#ffffff" width="425" colspan="3">
            <div><span>包含生成<span>ASP.NET移动应用程序所需要的核心功能,包括身份验证和错误处理.</span></span></div>
            </td>
        </tr>
        <tr>
            <td bgcolor="#ffffff" width="192" colspan="2">
            <div><span>System.Web.UI.MobileControls</span></div>
            </td>
            <td bgcolor="#ffffff" width="425" colspan="3">
            <div><span>包括一组<span>ASP.NET服务器控件,这些控件可以针对不同的移动设备呈现应用程&nbsp;序.</span></span></div>
            </td>
        </tr>
        <tr>
            <td bgcolor="#ffffff" width="192" colspan="2">
            <div><span>System.Web.Services</span></div>
            </td>
            <td bgcolor="#ffffff" width="425" colspan="3">
            <div><span>包含能使你使用和生成<span>XML&nbsp;Web&nbsp;Service的类,这些服务是驻留在服务器中的&nbsp;可编程实体,并通过标准Internet协议公开.</span></span></div>
            </td>
        </tr>
        <tr>
            <td bgcolor="#ffffff" valign="top" width="617" colspan="5">
            <div align="center"><strong><span>五、框架服务命名空间</span></strong></div>
            <hr />
            </td>
        </tr>
        <tr>
            <td bgcolor="#ffffff" width="168">
            <div><span>System.Diagnostics</span></div>
            </td>
            <td bgcolor="#ffffff" width="449" colspan="4">
            <div><span>这个命名空间所提供的类允许你启动系统进程<span>,读取和写入事件日志以及使用性&nbsp;能计数器监视系统性能.</span></span></div>
            </td>
        </tr>
        <tr>
            <td bgcolor="#ffffff" width="168">
            <div><span>System.DirectoryServices</span></div>
            </td>
            <td bgcolor="#ffffff" width="449" colspan="4">
            <div><span>这个命名空间所提供的类可便于从托管代码中访问<span>Active&nbsp;Directory.此命名空&nbsp;间中的类可以与任何Active&nbsp;Directory服务提供程序一起使用.</span></span></div>
            </td>
        </tr>
        <tr>
            <td bgcolor="#ffffff" width="168">
            <div><span>System.Media</span></div>
            </td>
            <td bgcolor="#ffffff" width="449" colspan="4">
            <div><span>包含用于播放声音文件和访问系统提供的声音的类<span>.</span></span></div>
            </td>
        </tr>
        <tr>
            <td bgcolor="#ffffff" width="168">
            <div><span>System.Management</span></div>
            </td>
            <td bgcolor="#ffffff" width="449" colspan="4">
            <div><span>这个命名空间提供的类用于管理一些信息和事件<span>,它们关系到系统,设备和WMI&nbsp;基础结构所使用的应用程序.</span></span></div>
            </td>
        </tr>
        <tr>
            <td bgcolor="#ffffff" width="168">
            <div><span>System.Messaging</span></div>
            </td>
            <td bgcolor="#ffffff" width="449" colspan="4">
            <div><span>这个命名空间提供的类用于连接到网络上的消息队列<span>,向队列发送消息,从队列&nbsp;接收或查看消息.</span></span></div>
            </td>
        </tr>
        <tr>
            <td bgcolor="#ffffff" width="168">
            <div><span>System.ServiceProcess</span></div>
            </td>
            <td bgcolor="#ffffff" width="449" colspan="4">
            <div><span>这个命名空间提供的类用于安装和运行服务<span>,服务是长期运行的可执行文件,它&nbsp;们不通过用户界面来运行.</span></span></div>
            </td>
        </tr>
        <tr>
            <td bgcolor="#ffffff" width="168">
            <div><span>System.Timers</span></div>
            </td>
            <td bgcolor="#ffffff" width="449" colspan="4">
            <div><span>这个命名空间提供基于服务器的计时器组件<span>,用以按指定的间隔引发事件.</span></span></div>
            </td>
        </tr>
        <tr>
            <td bgcolor="#ffffff" valign="top" width="617" colspan="5">
            <div align="center"><strong><span>六、安全性命名空间</span></strong></div>
            <hr />
            </td>
        </tr>
        <tr>
            <td bgcolor="#ffffff" width="168">
            <div><span>System.Security</span></div>
            </td>
            <td bgcolor="#ffffff" width="449" colspan="4">
            <div><span>这个命名空间提供公共语言运行库安全性系统的基础结构<span>.</span></span></div>
            </td>
        </tr>
        <tr>
            <td bgcolor="#ffffff" width="168">
            <div><span>System.Net.Security</span></div>
            </td>
            <td bgcolor="#ffffff" width="449" colspan="4">
            <div><span>这个命名空间提供用于主机间安全通信的网络流<span>.</span></span></div>
            </td>
        </tr>
        <tr>
            <td bgcolor="#ffffff" width="168">
            <div><span>System.Web.Security</span></div>
            </td>
            <td bgcolor="#ffffff" width="449" colspan="4">
            <div><span>这个命名空间包含的类用于在<span>Web应用程序中实现ASP.NET安全性.</span></span></div>
            </td>
        </tr>
        <tr>
            <td bgcolor="#ffffff" width="617" colspan="5">
            <div align="center"><span>七、网络命名空间</span></div>
            </td>
        </tr>
        <tr>
            <td bgcolor="#ffffff" width="204" colspan="3">
            <div><span>System.Net</span></div>
            </td>
            <td bgcolor="#ffffff" width="413" colspan="2">
            <div><span>包含的类可为当前网络上的多种协议提供简单的编程接口<span>.</span></span></div>
            </td>
        </tr>
        <tr>
            <td bgcolor="#ffffff" width="204" colspan="3">
            <div><span>System.Net.Cache</span></div>
            </td>
            <td bgcolor="#ffffff" width="413" colspan="2">
            <div><span>这个命名空间定义了一些类和枚举<span>,用于为使用WebRequest和HttpWebRequest类获取的资源定义缓存策略.&nbsp;</span></span></div>
            </td>
        </tr>
        <tr>
            <td bgcolor="#ffffff" width="204" colspan="3">
            <div><span>System.Net.Configuration</span></div>
            </td>
            <td bgcolor="#ffffff" width="413" colspan="2">
            <div><span>这个命名空间包含了以编程方式访问和更新<span>System.Net命名空间的配置设置的类.</span></span></div>
            </td>
        </tr>
        <tr>
            <td bgcolor="#ffffff" width="204" colspan="3">
            <div><span>System.Net.Mime</span></div>
            </td>
            <td bgcolor="#ffffff" width="413" colspan="2">
            <div><span>这个命名空间包含了用于将电子邮件发送到<span>SMTP服务器进行传送的类.</span></span></div>
            </td>
        </tr>
        <tr>
            <td bgcolor="#ffffff" width="204" colspan="3">
            <div><span>System.Net.Networkinformation</span></div>
            </td>
            <td bgcolor="#ffffff" width="413" colspan="2">
            <div><span>这个命名空间提供对网络流量数据<span>,网络地址信息和本地计算机的地址更改通知的访问,还包含实现Ping实用工具的类.你可以使用Ping和相关的类来检查是否可通过网络访问某台计算机.</span></span></div>
            </td>
        </tr>
        <tr>
            <td bgcolor="#ffffff" width="204" colspan="3">
            <div><span>System.Net.Sockets</span></div>
            </td>
            <td bgcolor="#ffffff" width="413" colspan="2">
            <div><span>这个命名空间为严格控制网络访问的开发人员提供<span>Windows套接字接口的托&nbsp;管实现</span></span></div>
            </td>
        </tr>
        <tr>
            <td bgcolor="#ffffff" valign="top" width="617" colspan="5">
            <div align="center"><strong><span>八、配置命名空间</span></strong></div>
            <hr />
            </td>
        </tr>
        <tr>
            <td bgcolor="#ffffff" width="205" colspan="4">
            <div><span>System.Configuration</span></div>
            </td>
            <td bgcolor="#ffffff" width="412">
            <div><span>这个命名空间包含用于以编程方式访问<span>.Net&nbsp;Framework配置设置并处理配置&nbsp;文件中错误的类.</span></span></div>
            </td>
        </tr>
        <tr>
            <td bgcolor="#ffffff" width="205" colspan="4">
            <div><span>System.Configuration.Assemblies</span></div>
            </td>
            <td bgcolor="#ffffff" width="412">
            <div><span>这个命名空间包含用于配置程序集的类<span>.</span></span></div>
            </td>
        </tr>
        <tr>
            <td bgcolor="#ffffff" width="205" colspan="4">
            <div><span>System.Configuration.Provider</span></div>
            </td>
            <td bgcolor="#ffffff" width="412">
            <div><span>这个命名空间包含由服务器和客户端应用程序共享<span>,以支持可插接式模型轻松添&nbsp;加或移除功能的基类.</span></span></div>
            </td>
        </tr>
        <tr>
            <td bgcolor="#ffffff" width="617" colspan="5">
            <div align="center"><strong><span>九、本地化命名空间</span></strong></div>
            <hr />
            </td>
        </tr>
        <tr>
            <td bgcolor="#ffffff" width="204" colspan="3">
            <div><span>System.Globalization</span></div>
            </td>
            <td bgcolor="#ffffff" width="413" colspan="2">
            <div><span>包含的类定义与区域性相关的信息<span>,其中包括语言,国家\地区,所使用的日历,日期&nbsp;格式的模式,货币与数字以及字符串的排序顺序.</span></span></div>
            </td>
        </tr>
        <tr>
            <td bgcolor="#ffffff" width="204" colspan="3">
            <div><span>System.Resources</span></div>
            </td>
            <td bgcolor="#ffffff" width="413" colspan="2">
            <div><span>这个命名空间提供一些类和接口<span>,它们使开发人员得以创建,存储并管理应用程&nbsp;序中使用的各种区域性特定资源.</span></span></div>
            </td>
        </tr>
        <tr>
            <td bgcolor="#ffffff" width="204" colspan="3">
            <div><span>System.Resources.Tools</span></div>
            </td>
            <td bgcolor="#ffffff" width="413" colspan="2">
            <div><span>这个命名空间包含<span>StronglyTypedResourceBuilder类,该类提供对强类型资源&nbsp;的支持.这个编译时功能通过创建包含一组静态只读属性的类封装对资源的访问,&nbsp;从而使得使用资源变得更加容易</span></span></div>
            </td>
        </tr>
    </tbody>
</table>]]></description>
		</item>
		
			<item>
			<link>https://blog.imwebs.com/article.asp?id=553</link>
			<title><![CDATA[Web 开发常用命名空间和类介绍(.NET Framework)]]></title>
			<author>webmaster@imwebs.com(Admin)</author>
			<category><![CDATA[dotNet]]></category>
			<pubDate>Mon,14 Mar 2011 00:31:51 +0800</pubDate>
			<guid>https://blog.imwebs.com/default.asp?id=553</guid>
		<description><![CDATA[System.Collections //命名空间包含接口和类，这些接口和类定义各种对象（如列表、队列、位数组、哈希表和字典）的集合。 <br/>System.Collections.Generic //命名空间包含定义泛型集合的接口和类，泛型集合允许用户创建强类型集合，它能提供比非泛型强类型集合更好的类型安全性和性能。 <br/>System.Configuration //命名空间包含提供用于处理配置数据的编程模型的类型。 <br/>System.Data //命名空间提供对表示 ADO.NET 结构的类的访问。通过 ADO.NET 可以生成一些组件，用于有效管理多个数据源的数据。 <br/>System.Data.Common //命名空间包含由各种 .NET Framework 数据提供程序共享的类。 <br/>System.Data.Odbc //命名空间是用于 ODBC 的 .NET Framework 数据提供程序。 <br/>System.Data.OleDb //命名空间是用于 OLE DB 的 .NET Framework 数据提供程序。 <br/>System.Data.Sql //命名空间包含支持 SQL Server 特定的功能的类。 <br/>System.Data.OracleClient //命名空间是用于 o&#114;acle 的 .NET Framework 数据提供程序。 <br/>System.Data.SqlClient //命名空间是 SQL Server 的 .NET Framework 数据提供程序。 <br/>System.Data.SqlTypes //命名空间为 SQL Server 2005 中的本机数据类型提供类。 <br/>System.Drawing //命名空间提供了对 GDI+ 基本图形功能的访问。 <br/>System.Drawing.Design //命名空间包含扩展设计时用户界面 (UI) 逻辑和绘制的类。 <br/>System.Drawing.Drawing2D //命名空间提供高级的二维和矢量图形功能 <br/>System.Drawing.Imaging //命名空间提供高级 GDI+ 图像处理功能 <br/>System.Drawing.Text //命名空间提供高级 GDI+ 排版功能。 <br/>System.Globalization //命名空间包含定义区域性相关信息的类，这些信息包括语言、国家/地区、使用的日历、日期、货币和数字的格式模式以及字符串的排序顺序。我们可以使用这些类编写全球化（国际化）应用程序 <br/>System.IO //命名空间包含允许读写文件和数据流的类型以及提供基本文件和目录支持的类型。 <br/>System.Management&nbsp;&nbsp;//提供对大量管理信息和管理事件集合的访问，这些信息和事件是与根据 Windows 管理规范 (WMI) 结构对系统、设备和应用程序设置检测点有关的 <br/>System.Net //命名空间为当前网络上使用的多种协议提供了简单的编程接口 <br/>System.Net.Mail //命名空间包含用于将电子邮件发送到简单邮件传输协议 (SMTP) 服务器进行传送的类 <br/>System.Reflection //命名空间包含通过检查托管代码中程序集、模块、成员、参数和其他实体的元数据来检索其相关信息的类型。这些类型还可用于操作加载类型的实例，例如挂钩事件或调用方法。若要动态创建类型，请使用 System.Reflection.Emit 命名空间。 <br/>System.Text //命名空间&nbsp;&nbsp;<br/>System.Text.RegularExpressions //命名空间包含一些类，这些类提供对 .NET Framework 正则表达式引擎的访问。 <br/>System.Threading //命名空间提供一些使得可以进行多线程编程的类和接口。 <br/>System.Timers //命名空间提供 Timer 组件，它使您可以指定的间隔引发事件。 <br/>System.Web //命名空间提供使得可以进行浏览器与服务器通信的类和接口。 <br/>System.Web.Caching //命名空间提供用于缓存服务器上常用数据的类。 <br/>System.Web.Configuration //命名空间包含用于设置 ASP.NET 配置的类。 <br/>System.Web.Handlers //命名空间包含的 HTTP 处理程序类用于处理对 Web 服务器发出的请求。 <br/>System.Web.Services //命名空间由使您可以用 ASP.NET 和 XML Web services 客户端来创建 XML Web services 的类组成 <br/>System.Web.UI //命名空间提供的类和接口可用于创建 ASP.NET 服务器控件以及用作 ASP.NET Web 应用程序用户界面的 ASP.NET 网页 <br/>System.Web.UI.Adapters //命名空间包含控件适配器和页适配器的基类。可以使用这些适配器来重写页和控件的生命周期状态。如果要修改这些控件的标记或行为，使其适应新的标记标准或特定浏览器，则这样的重写很有用。 <br/>System.Web.UI.Design //命名空间包含的类可用于扩展对 ASP.NET 网页和 Web 服务器控件的设计时支持。 <br/>System.Web.UI.HtmlControls //命名空间包含的类允许在 Web 窗体页上创建 HTML 服务器控件。 <br/>System.Web.UI.WebControls //命名空间包含一些类，可使用这些类在网页上创建 Web 服务器控件 <br/>System.Xml //命名空间为处理 XML 提供基于标准的支持。]]></description>
		</item>
		
			<item>
			<link>https://blog.imwebs.com/article.asp?id=527</link>
			<title><![CDATA[C# 语法基础]]></title>
			<author>webmaster@imwebs.com(parno)</author>
			<category><![CDATA[dotNet]]></category>
			<pubDate>Fri,30 Apr 2010 22:44:36 +0800</pubDate>
			<guid>https://blog.imwebs.com/default.asp?id=527</guid>
		<description><![CDATA[<p><strong>1、变量定义</strong><br />
&nbsp;</p>
<div class="codeText">
<div class="codeHead">C#代码</div>
<ol class="dp-c">
    <li class="alt"><span><span class="keyword">int</span><span>&nbsp;myInt;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="comment">//变量类型&nbsp;变量名</span><span>&nbsp;&nbsp;</span></span></li>
    <li><span>myInt&nbsp;=&nbsp;10;&nbsp;<span class="comment">//初始化</span><span>&nbsp;&nbsp;</span></span></li>
    <li class="alt"><span><span class="keyword">int</span><span>&nbsp;myInt2&nbsp;=&nbsp;10;&nbsp;</span><span class="comment">//变量类型&nbsp;变量名&nbsp;=&nbsp;初始化值</span><span>&nbsp;&nbsp;</span></span></li>
    <li><span><span class="keyword">int</span><span>&nbsp;myInt3,&nbsp;myInt4;&nbsp;</span><span class="comment">//&nbsp;多个相同类型的变量在同一行一起声明</span><span>&nbsp;&nbsp;</span></span></li>
    <li class="alt"><span><span class="keyword">int</span><span>&nbsp;myInt5&nbsp;=&nbsp;11,&nbsp;myInt5&nbsp;=&nbsp;12;&nbsp;</span><span class="comment">//多个相同的类型的变在同一行一起声明并初始化</span><span>&nbsp;&nbsp;</span></span></li>
</ol>
</div>
<p><br />
C#变量在声明后必需要先初始化才能访问，否则编译会报错。如上面代码中 myInt3 和 myInt4 还没有初始化。</p>
<div class="codeText">
<div class="codeHead">C#代码</div>
<ol class="dp-c">
    <li class="alt"><span><span class="keyword">using</span><span>&nbsp;System;&nbsp;&nbsp;</span></span></li>
    <li><span>&nbsp;&nbsp;</span></li>
    <li class="alt"><span><span class="keyword">class</span><span>&nbsp;MyInit&nbsp;&nbsp;</span></span></li>
    <li><span>{&nbsp;&nbsp;</span></li>
    <li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">static</span><span>&nbsp;</span><span class="keyword">void</span><span>&nbsp;Main()&nbsp;&nbsp;</span></span></li>
    <li><span>&nbsp;&nbsp;&nbsp;&nbsp;{&nbsp;&nbsp;</span></li>
    <li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">double</span><span>&nbsp;r&nbsp;=&nbsp;2,&nbsp;h&nbsp;=&nbsp;3;&nbsp;&nbsp;</span></span></li>
    <li><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">double</span><span>&nbsp;v&nbsp;=&nbsp;3.14159&nbsp;*&nbsp;r&nbsp;*&nbsp;h;&nbsp;&nbsp;</span></span></li>
    <li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Console.WriteLine(<span class="string">&quot;V&nbsp;is&nbsp;&quot;</span><span>&nbsp;+&nbsp;v);&nbsp;&nbsp;</span></span></li>
    <li><span>&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;&nbsp;</span></li>
    <li class="alt"><span>}&nbsp;&nbsp;</span></li>
</ol>
</div>
<p><br />
变量的作用域、生命周期：</p>
<p>C# 可以用{}来定义程序，一个程序块就是一个作用域，作用域可以嵌套，在外层作用域声明的变量对内层的代码是可见的，反之，内层作用域声明的变量对外屋来说 不可见。</p>
<div class="codeText">
<div class="codeHead">C#代码</div>
<ol class="dp-c">
    <li class="alt"><span><span class="keyword">void</span><span>&nbsp;myfun()&nbsp;&nbsp;</span></span></li>
    <li><span>{&nbsp;<span class="comment">//外层代码块开始</span><span>&nbsp;&nbsp;</span></span></li>
    <li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">int</span><span>&nbsp;a;&nbsp;&nbsp;</span></span></li>
    <li><span>&nbsp;&nbsp;&nbsp;&nbsp;{&nbsp;<span class="comment">//内层代码块开始</span><span>&nbsp;&nbsp;</span></span></li>
    <li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">int</span><span>&nbsp;b;&nbsp;&nbsp;</span></span></li>
    <li><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;a&nbsp;=&nbsp;1;&nbsp;&nbsp;</span></li>
    <li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;<span class="comment">//内层代码块结束</span><span>&nbsp;&nbsp;</span></span></li>
    <li><span>&nbsp;&nbsp;&nbsp;&nbsp;a&nbsp;=&nbsp;2;&nbsp;&nbsp;</span></li>
    <li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;b&nbsp;=&nbsp;3;&nbsp;<span class="comment">//出错，因为&nbsp;b&nbsp;声明于内层代码块，外层不能访问</span><span>&nbsp;&nbsp;</span></span></li>
    <li><span>}&nbsp;<span class="comment">//外层代码块结束</span><span>&nbsp;&nbsp;</span></span></li>
</ol>
</div>
<p>常见运算符：+、-、*、/、%、++、--<br />
<br />
关系运算符：==、!=、&gt;、&lt;、&gt;=、&lt;=<br />
<br />
逻辑运算符：&amp;、|、^、||、&amp;&amp;、!<br />
^ 表示逻辑 XOR<br />
C# 中 &amp;&amp; 和 || 是 AND(&amp;) 和 or(|) 的&ldquo;短路&rdquo;版本，意思是如果第一个检查满足的话那就不再进行查运算符后面的检查。<br />
<br />
赋值：=<br />
<br />
复合赋值：+=、-=、*=、/=、%=、&amp;=，|=，^=<br />
<br />
强制类型转换：(type) expression，type 是期望的类型。<br />
(int) myExpression<br />
<br />
基本数据类型：</p>
<p>整型：sbyte(8位)，byte(8位)，short(16 位)，ushort(16位)，int(32位)，uint(32位)，long(64位)，ulong(64位)<br />
浮点型：float(32位)，double(64位)，decimal(128位)<br />
其它类型：bool(16位)，char(16位)，string<br />
整数默认为 int 类型，浮点数默认为 double 类型，decimal 精度最高，常用于货币计算。char 表示的是一个 Unicode 字符，string 几乎没有长度限制。<br />
<br />
<br />
<strong>2、静态变量和非静态变量</strong><br />
<br />
静态变量是带有 static 修饰符的变量，不带 static 的非静太变量称为实例变量。</p>
<div class="codeText">
<div class="codeHead">C#代码</div>
<ol class="dp-c">
    <li class="alt"><span><span class="keyword">class</span><span>&nbsp;Class1&nbsp;&nbsp;</span></span></li>
    <li><span>{&nbsp;&nbsp;</span></li>
    <li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">static</span><span>&nbsp;</span><span class="keyword">int</span><span>&nbsp;b&nbsp;=&nbsp;0;&nbsp;</span><span class="comment">//静态变量</span><span>&nbsp;&nbsp;</span></span></li>
    <li><span>&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">int</span><span>&nbsp;a&nbsp;=&nbsp;0;&nbsp;</span><span class="comment">//非静态变量</span><span>&nbsp;&nbsp;</span></span></li>
    <li class="alt"><span>}&nbsp;&nbsp;</span></li>
</ol>
</div>
<p>静态变量通过&ldquo;类名.静态变量名&rdquo;来调用，类的实例不能调用。如上例访问静态变量 b 时：Class1.b = 1<br />
非静态变量要在类被实例化后通过实例化的对象名来访问。如上例访问非静态变量时：</p>
<div class="codeText">
<div class="codeHead">C#代码</div>
<ol class="dp-c">
    <li class="alt"><span><span>Class1&nbsp;c1&nbsp;=&nbsp;</span><span class="keyword">new</span><span>&nbsp;Class1();&nbsp;&nbsp;</span></span></li>
    <li><span>c1.a&nbsp;=&nbsp;0;&nbsp;<span class="comment">//访问非静态变量&nbsp;a&nbsp;成功</span><span>&nbsp;&nbsp;</span></span></li>
    <li class="alt"><span>Class1.b&nbsp;=&nbsp;1;&nbsp;<span class="comment">//使用类名访问静态变量&nbsp;b&nbsp;成功</span><span>&nbsp;&nbsp;</span></span></li>
    <li><span>c1.b&nbsp;=&nbsp;1;&nbsp;<span class="comment">//这里会出错，因为静态变量不能通用实例引用</span><span>&nbsp;&nbsp;</span></span></li>
</ol>
</div>
<p>静态变量被所有类的实例对象共享，即一个实例改变了静态变量的值，其它同类的实例读到是改变后的新值，非静态变量是不共享的。<br />
静态变量生命周期从类装载直到类消亡，非静态变量存在期从类实例创建到实例消亡。</p>
<p>&nbsp;</p>
<p><strong>3、局部变量、数组元素、值参数、引用参数、输出参数</strong><br />
<br />
局部变量指在独立程序块、for、switch 或 using 语句中声明的变量，它只在范围内有效。<br />
一般参数的使用：</p>
<div class="codeText">
<div class="codeHead">C#代码</div>
<ol class="dp-c">
    <li class="alt"><span><span class="keyword">int</span><span>&nbsp;i&nbsp;=&nbsp;1,&nbsp;j&nbsp;=&nbsp;2;&nbsp;&nbsp;</span></span></li>
    <li><span><span class="comment">//i&nbsp;和&nbsp;j&nbsp;是一般参数，一般参数传递进函数的是参数的拷贝值</span><span>&nbsp;&nbsp;</span></span></li>
    <li class="alt"><span><span class="keyword">int</span><span>&nbsp;add(</span><span class="keyword">int</span><span>&nbsp;i,&nbsp;</span><span class="keyword">int</span><span>&nbsp;j)&nbsp;&nbsp;</span></span></li>
    <li><span>{&nbsp;&nbsp;</span></li>
    <li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">return</span><span>&nbsp;i&nbsp;+&nbsp;j;&nbsp;&nbsp;</span></span></li>
    <li><span>}&nbsp;&nbsp;</span></li>
    <li class="alt"><span>&nbsp;&nbsp;</span></li>
    <li><span>main()&nbsp;&nbsp;</span></li>
    <li class="alt"><span>{&nbsp;&nbsp;</span></li>
    <li><span>&nbsp;&nbsp;&nbsp;&nbsp;print(add(i,&nbsp;j));&nbsp;&nbsp;</span></li>
    <li class="alt"><span>}&nbsp;&nbsp;</span></li>
</ol>
</div>
<p>引用参数的使用：</p>
<div class="codeText">
<div class="codeHead">C#代码</div>
<ol class="dp-c">
    <li class="alt"><span><span class="keyword">int</span><span>&nbsp;i&nbsp;=&nbsp;1,&nbsp;j&nbsp;=&nbsp;2;&nbsp;&nbsp;</span></span></li>
    <li><span><span class="comment">//void&nbsp;表示函数无返回值或可以说是返回&nbsp;void&nbsp;类型，main&nbsp;可以不写，这里的&nbsp;i&nbsp;和&nbsp;j&nbsp;是引用参数，ref&nbsp;和&nbsp;out&nbsp;参数直接修改内存中的值。</span><span>&nbsp;&nbsp;</span></span></li>
    <li class="alt"><span>{&nbsp;&nbsp;</span></li>
    <li><span><span class="keyword">void</span><span>&nbsp;add(</span><span class="keyword">ref</span><span>&nbsp;</span><span class="keyword">int</span><span>&nbsp;i,&nbsp;</span><span class="keyword">ref</span><span>&nbsp;</span><span class="keyword">int</span><span>&nbsp;j)&nbsp;&nbsp;</span></span></li>
    <li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;i&nbsp;=&nbsp;i&nbsp;+&nbsp;j&nbsp;&nbsp;</span></li>
    <li><span>}&nbsp;&nbsp;</span></li>
    <li class="alt"><span>&nbsp;&nbsp;</span></li>
    <li><span>main()&nbsp;&nbsp;</span></li>
    <li class="alt"><span>{&nbsp;&nbsp;</span></li>
    <li><span>&nbsp;&nbsp;&nbsp;&nbsp;add(i,&nbsp;j);&nbsp;&nbsp;</span></li>
    <li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;print(i);&nbsp;&nbsp;</span></li>
    <li><span>}&nbsp;&nbsp;</span></li>
</ol>
</div>
<p>ref 和 out 的区别：</p>
<p>ref 要求参数在传递之前进行初始化，而 out 要求在函数中对参数进行初始化。所以，ref 是输入输出参数，而 out 是输出参数。<br />
<br />
<strong><br />
4、常量</strong><br />
<br />
常量的值固定不可改变。</p>
<p>静态常量：</p>
<p>const 声明的常量叫静态常量，声明时必须初始化，且只能用常数值。<br />
常量声明语法：属性修饰符 const 类型 名称 = 值<br />
属性修饰符包括：new、public、protected、internal、private<br />
类型包括：sbyte、byte、short、ushort、int、uint、long、ulong、char、float、double、decimal、bool、string、enum-type(枚举类型)和 reference-type(引用类型)。</p>
<div class="codeText">
<div class="codeHead">C#代码</div>
<ol class="dp-c">
    <li class="alt"><span><span class="keyword">class</span><span>&nbsp;Class1&nbsp;&nbsp;</span></span></li>
    <li><span>{&nbsp;&nbsp;</span></li>
    <li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">const</span><span>&nbsp;</span><span class="keyword">double</span><span>&nbsp;PI&nbsp;=&nbsp;3.14;&nbsp;</span><span class="comment">//常量&nbsp;PI&nbsp;作为一个字段或属性</span><span>&nbsp;&nbsp;</span></span></li>
    <li><span>&nbsp;&nbsp;&nbsp;&nbsp;myfun()&nbsp;&nbsp;</span></li>
    <li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;{&nbsp;&nbsp;</span></li>
    <li><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">const</span><span>&nbsp;</span><span class="keyword">int</span><span>&nbsp;i&nbsp;=&nbsp;2;&nbsp;</span><span class="comment">//i&nbsp;作为一个本地常量</span><span>&nbsp;&nbsp;</span></span></li>
    <li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;&nbsp;</span></li>
    <li><span>}&nbsp;&nbsp;</span></li>
</ol>
</div>
<p>动态常量：</p>
<p>readonly 声明的常量叫动态常量，在声明时可以不初始化，但必须在每个构造函数中初始化，可能使用变量值初始化，可以作为一个实例的成员或一个静态类的成员。</p>
<div class="codeText">
<div class="codeHead">C#代码</div>
<ol class="dp-c">
    <li class="alt"><span><span class="keyword">class</span><span>&nbsp;Class1&nbsp;&nbsp;</span></span></li>
    <li><span>{&nbsp;&nbsp;</span></li>
    <li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">readonly</span><span>&nbsp;</span><span class="keyword">float</span><span>&nbsp;VALUE1;&nbsp;</span><span class="comment">//动态常量&nbsp;VALUE，最好用大写字母</span><span>&nbsp;&nbsp;</span></span></li>
    <li><span>&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">readonly</span><span>&nbsp;</span><span class="keyword">int</span><span>&nbsp;VALUE2&nbsp;=&nbsp;3;&nbsp;</span><span class="comment">//动态常量&nbsp;VALUE</span><span>&nbsp;&nbsp;</span></span></li>
    <li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">readonly</span><span>&nbsp;StringBuilder&nbsp;SB1;&nbsp;&nbsp;</span></span></li>
    <li><span>&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">public</span><span>&nbsp;myfun()&nbsp;&nbsp;</span></span></li>
    <li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;{&nbsp;&nbsp;</span></li>
    <li><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;VALUE1&nbsp;=&nbsp;9.80F;&nbsp;<span class="comment">//9.80后面的&nbsp;F&nbsp;表示强制常量类型是&nbsp;float&nbsp;类型，long&nbsp;为&nbsp;L，uint&nbsp;为&nbsp;U，ulong&nbsp;为&nbsp;UL，decimal&nbsp;为&nbsp;M</span><span>&nbsp;&nbsp;</span></span></li>
    <li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></li>
    <li><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sb1&nbsp;=&nbsp;<span class="keyword">new</span><span>&nbsp;StringBuilder();&nbsp;&nbsp;</span></span></li>
    <li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;&nbsp;</span></li>
    <li><span>&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">public</span><span>&nbsp;myfun(</span><span class="keyword">float</span><span>&nbsp;value)&nbsp;</span><span class="comment">//每个构造函数中都要初始化，而且可以使用变量</span><span>&nbsp;&nbsp;</span></span></li>
    <li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;{&nbsp;&nbsp;</span></li>
    <li><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;VALUE1&nbsp;=&nbsp;value;&nbsp;&nbsp;</span></li>
    <li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;&nbsp;</span></li>
    <li><span>}&nbsp;&nbsp;</span></li>
</ol>
</div>
<p>&nbsp;</p>
<p><strong>5、C# 程序典型框架</strong></p>
<div class="codeText">
<div class="codeHead">C#代码</div>
<ol class="dp-c">
    <li class="alt"><span><span class="keyword">using</span><span>&nbsp;System;&nbsp;</span><span class="comment">//引用&nbsp;.NET&nbsp;框架中的类库资源</span><span>&nbsp;&nbsp;</span></span></li>
    <li><span><span class="keyword">namespace</span><span>&nbsp;YourNamespace&nbsp;</span><span class="comment">//命名空间</span><span>&nbsp;&nbsp;</span></span></li>
    <li class="alt"><span>{&nbsp;&nbsp;</span></li>
    <li><span>&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">class</span><span>&nbsp;YourClass&nbsp;</span><span class="comment">//类</span><span>&nbsp;&nbsp;</span></span></li>
    <li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;{&nbsp;&nbsp;</span></li>
    <li><span>&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;&nbsp;</span></li>
    <li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></li>
    <li><span>&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">struct</span><span>&nbsp;YourStruct&nbsp;</span><span class="comment">//结构</span><span>&nbsp;&nbsp;</span></span></li>
    <li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;{&nbsp;&nbsp;</span></li>
    <li><span>&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;&nbsp;</span></li>
    <li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></li>
    <li><span>&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">interface</span><span>&nbsp;IYourInterface&nbsp;</span><span class="comment">//接口</span><span>&nbsp;&nbsp;</span></span></li>
    <li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;{&nbsp;&nbsp;</span></li>
    <li><span>&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;&nbsp;</span></li>
    <li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></li>
    <li><span>&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">delegate</span><span>&nbsp;</span><span class="keyword">int</span><span>&nbsp;YourDelegate();&nbsp;</span><span class="comment">//委托</span><span>&nbsp;&nbsp;</span></span></li>
    <li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></li>
    <li><span>&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">enum</span><span>&nbsp;YourEnum&nbsp;</span><span class="comment">//枚举</span><span>&nbsp;&nbsp;</span></span></li>
    <li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;{&nbsp;&nbsp;</span></li>
    <li><span>&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;&nbsp;</span></li>
    <li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></li>
    <li><span>&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">namespace</span><span>&nbsp;YourNestedNamespace&nbsp;</span><span class="comment">//嵌套的命名空间</span><span>&nbsp;&nbsp;</span></span></li>
    <li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;{&nbsp;&nbsp;</span></li>
    <li><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">struct</span><span>&nbsp;YourStruct&nbsp;</span><span class="comment">//结构</span><span>&nbsp;&nbsp;</span></span></li>
    <li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{&nbsp;&nbsp;</span></li>
    <li><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;&nbsp;</span></li>
    <li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;&nbsp;</span></li>
    <li><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></li>
    <li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">class</span><span>&nbsp;YourMainClass&nbsp;</span><span class="comment">//应用程序主类</span><span>&nbsp;&nbsp;</span></span></li>
    <li><span>&nbsp;&nbsp;&nbsp;&nbsp;{&nbsp;&nbsp;</span></li>
    <li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;<span class="comment">/*&nbsp;C#&nbsp;可执行程序入口是&nbsp;Main&nbsp;方法，程序的执行从&nbsp;Main&nbsp;方法开始，</span>&nbsp;</span></li>
    <li><span><span class="comment">&nbsp;&nbsp;&nbsp;&nbsp;到&nbsp;Main&nbsp;方法结束，但动态连接库&nbsp;DLL&nbsp;程序可以没有&nbsp;Main&nbsp;方法,入口</span>&nbsp;</span></li>
    <li class="alt"><span><span class="comment">&nbsp;&nbsp;&nbsp;&nbsp;方法唯一且为一个类中的静态方法，通常无返回值&nbsp;void(也可以返回</span>&nbsp;</span></li>
    <li><span><span class="comment">&nbsp;&nbsp;&nbsp;&nbsp;int)，通常传递进该方法的是字符串数组类型的命令行参数&nbsp;*/</span><span>&nbsp;&nbsp;</span></span></li>
    <li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">static</span><span>&nbsp;</span><span class="keyword">void</span><span>&nbsp;Main(</span><span class="keyword">string</span><span>[]&nbsp;args)&nbsp;</span><span class="comment">//入口</span><span>&nbsp;&nbsp;</span></span></li>
    <li><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{&nbsp;&nbsp;</span></li>
    <li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">int</span><span>&nbsp;myINT;&nbsp;</span><span class="comment">//语句以;结束</span><span>&nbsp;&nbsp;</span></span></li>
    <li><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">string</span><span>&nbsp;&nbsp;&nbsp;&nbsp;myString;&nbsp;</span><span class="comment">//编译器会忽略空白字符(空格/回车/Tab)</span><span>&nbsp;&nbsp;</span></span></li>
    <li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;myINT&nbsp;=&nbsp;10;&nbsp;<span class="comment">//编译器对大小写敏感</span><span>&nbsp;&nbsp;</span></span></li>
    <li><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;&nbsp;</span></li>
    <li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;&nbsp;</span></li>
    <li><span>}&nbsp;&nbsp;</span></li>
</ol>
</div>
<p><br />
&nbsp;</p>]]></description>
		</item>
		
			<item>
			<link>https://blog.imwebs.com/article.asp?id=497</link>
			<title><![CDATA[VisualBasic.NET 连接数据库的几种方法]]></title>
			<author>webmaster@imwebs.com(parno)</author>
			<category><![CDATA[dotNet]]></category>
			<pubDate>Tue,17 Nov 2009 23:48:59 +0800</pubDate>
			<guid>https://blog.imwebs.com/default.asp?id=497</guid>
		<description><![CDATA[　　Microsoft Visual Basic.NET是Microsoft Visual Basic的更新版本，它基于.NET的框架结构，能使用户非常容易地创建Microsoft Windows操作系统和网络的应用程序。 使用Visual Basic.NET，可以快速地实现可视化开发网络应用程序、网络服务、Windows 应用程序和服务器端组件。另外，Visual Basic.NET为Windows应用程序提供了XCOPY部署，开发人员不再需要为DLL的版本问题担忧。Visual Basic现在已经真正成为面向对象以及支持继承性的语言。窗体设计器支持可视化继承，并且包含了许多新的特性，比如自动改变窗体大小、资源本地化以及可达性支持。数据类工具内在支持XML数据，在设计时数据绑定使用断开的数据。另外， Visual Basic.NET直接建立在.NET的框架结构上，因此开发人员可以充分利用所有平台特性，也可以与其他的.NET语言交互。&nbsp;&nbsp;<br/><br/>　　在这篇文章中我要跟大家讲的，是介绍Visual Basic.NET的数据库编程及其相关知识。 <br/><br/>　　<strong>一、先介绍ADO.NET和ODBC.NET </strong><br/><br/>　　ADO .NET由Microsoft ActiveX Data Objects (ADO)改进而来，它提供平台互用和可收缩的数据访问功能，是Visual Basic.NET进行数据库编程所使用的重要工具。ADO.NET 使用了某些 ADO 的对象，如 Connection 和 Command 对象，并且还引入了新的对象。主要的新 ADO.NET 对象包括 DataSet、DataReader 和 DataAdapter。 <br/><br/>　　ODBC.NET是.NET框架中另外一个很有用的用于数据库开发的类库。但是，在.NET FrameWork SDK1.0版中不包含ODBC.NET，要使用ODBC.NET请到微软网站下载，具体下载地址：<a href="http://msdn.microsoft.com/library/default.asp?url=/downloads/list" target="_blank" rel="external">http://msdn.microsoft.com/library/default.asp?url=/downloads/list</a> /netdevframework.asp（文件名是odbc_net.msi）在默认情况下，安装路径是“C:\Program File\Microsoft.net\odbc.net”。安装后的组件名为Microsoft.Data.Odbc.dll文件。 <br/><br/>　　添加ODBC .NET Data Provider的步骤： <br/><br/>　　启动Visual Basic.NET开发环境，选中菜单栏的[工具]—&gt;[数据]—&gt;[自定义工具箱]，在弹出的[自定义工具箱]对话框中选[.Net 框架组件]单击[浏览]按钮，在“C:\Program File\Microsoft.net\odbc.net”目录下选择Microsoft.Data.Odbc.dll文件。接下来就在[自定义工具箱] 中选择“OdbcCommand”、“OdbcCommandBuilder”、“OdbcConnection”、“OdbcDataApdater” 后，单击[确定]。至此，完成了在Visual Basic.NET中加入ODBC .NET。 <br/><br/>　　<strong>二、接下来介绍数据提供者（Data Provider） </strong><br/><br/>　　ADO.NET和ODBC.NET两者共提供了三种数据提供者，其中ADO.NET提供两种（The SQL Server .NET Data Provider和 The OLE DB .NET Data Provider ）ODBC .NET提供一种（The ODBC .NET Data Provider）。表1是三种数据提供者及其支持的数据库:<br/><br/><div align="center"><img src="https://blog.imwebs.com/download.asp?id=5" border="0" alt=""/><br/>表1三种数据提供者及其支持的数据库 </div><br/><br/>　　<strong>三、接下来就分别介绍以上几种数据提供者连接各种数据库 </strong><br/><br/>　　1、用The SQL Server .NET Data Provider连接数据库 <br/><br/>　　The SQL Server .NET Data Provider是利用SqlConnection类来连接SQL Server7.0或更高版本的数据库， <br/><br/>　　SqlConnection类位于名称空间System.Data.SqlClient下。 <br/><br/>　　连接代码： <br/><br/>　　Dim sqlConnection1 As SqlClient.SqlConnection&nbsp;&nbsp;<br/><br/>　　Dim strConnect As String=”data source=服务器名;initial catalog=数据库名;user id=sa;password=;” <br/><br/>　　sqlConnection1=New System.Data.SqlClient.SqlConnection(strConnect) <br/><br/>　　sqlConnection1.open&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;‘打开数据库 <br/><br/>　　sqlConnection1.close&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;‘关闭连接，释放资源&nbsp;&nbsp;<br/>&nbsp;&nbsp;<br/>　　2、&nbsp;&nbsp; 用The OLE DB .NET Data Provider连接数据库 <br/><br/>　　上面已经说过，利用The OLE DB .NET Data Provider可以访问Access、Oracle和SQL Server等种数据库，那么，它是怎样访问这些数据库的呢？The OLE DB .NET Data Provider是通过位于名称空间System.Data.OleDb类库下的OleDbConnection类来连接这三种不同类型的数据库的。下面举例说明: <br/><br/>　　1)连接SQL Server数据库 <br/><br/>　　Dim oleDbConnection1 As OleDb.OleDbConnection&nbsp;&nbsp;<br/><br/>　　Dim strConnect As Sting=”Provider=SQLOLEDB;Persist Security Info=False;Data Source=服务器名;Initial Catalog=数据库名;User ID=sa;Password=;” <br/><br/>　　oleDbConnection1=New System.Data.OleDb.OleDbConnection(strConnect)&nbsp;&nbsp;<br/>&nbsp;&nbsp;<br/>　　2)连接Access数据库 <br/><br/>　　假设要连接的Access数据库名为“Example.mdb”，存放在d:\Data\目录下。 <br/><br/>　　Dim oleDbConnection1 As OleDb.OleDbConnection&nbsp;&nbsp;<br/><br/>　　Dim strConnect As Sting=”Provider=Microsoft.Jet.OLEDB.4.0;Data Source=d:\Data\ Example.mdb” <br/><br/>　　oleDbConnection1= New System.Data.OleDb.OleDbConnection(strConnect)&nbsp;&nbsp;<br/>&nbsp;&nbsp;<br/>　　3)连接Oracle数据库 <br/><br/>　　Dim oleDbConnection1 As OleDb.OleDbConnection&nbsp;&nbsp;<br/><br/>　　Dim strConnect As Sting=”Provider=MSDAORA;Data Source=服务器名;User ID=用户ID;Password=密码;” <br/><br/>　　oleDbConnection1= New System.Data.OleDb.OleDbConnection(strConnect)&nbsp;&nbsp;<br/>&nbsp;&nbsp;<br/>　　3、用The ODBC .NET Data Provider连接数据库 <br/><br/>　　The ODBC .NET Data Provider连接数据库是通过OdbcConnection类来实现的，这个类位于名称空间Microsoft.Data.Odbc下，而名称空间 Microsoft.Data.Odbc是封装在Microsoft.Data.Odbc.dll文件下的。 <br/><br/>　　1)连接Sql Server数据库 <br/><br/>　　Dim odbcDbConnetion1 As Microsoft.Data.OdbcConnection&nbsp;&nbsp;<br/><br/>　　Dim strConnect As Sting=”Driver={SQL Server};Server=服务器名;Uid=sa;pwd=;Database= 数据库名;” <br/><br/>　　odbcDbConnetion1=New Microsoft.Data.OdbcConnection(strConnect)&nbsp;&nbsp;<br/>&nbsp;&nbsp;<br/>　　2)连接Oracle数据库 <br/><br/>　　Dim odbcDbConnetion1 As Microsoft.Data.OdbcConnection&nbsp;&nbsp;<br/><br/>　　Dim strConnect As Sting=”Driver={Microsoft ODBC for o&#114;acle};Server=服务器名;Uid=sa;pwd=;” <br/><br/>　　odbcDbConnetion1=New Microsoft.Data.OdbcConnection(strConnect)&nbsp;&nbsp;<br/>&nbsp;&nbsp;<br/>　　<strong>四、总结 </strong><br/><br/>　　通过本文的介绍，读者基本掌握了在Visual Basic.NET中用ADO.NET和ODBC.NET连接各种数据库的方法。以上三种驱动针对不同的数据库，它们的性能方面也有很大的不同：The SQL Server .NET Data Provider的效率最高；The OLE DB .NET Data Provider的效率比较底；The ODBC .NET Data Provider的效率最慢。 <br/><br/>　　具体连接哪一种数据库选用哪一种数据驱动要从工作效率方面来考虑。]]></description>
		</item>
		
</channel>
</rss>
