惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

V2EX - 技术
V2EX - 技术
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
T
Threat Research - Cisco Blogs
T
The Exploit Database - CXSecurity.com
S
Schneier on Security
S
Securelist
P
Privacy & Cybersecurity Law Blog
Scott Helme
Scott Helme
T
Threatpost
C
Cybersecurity and Infrastructure Security Agency CISA
L
LINUX DO - 热门话题
Cyberwarzone
Cyberwarzone
Cisco Talos Blog
Cisco Talos Blog
量子位
博客园 - Franky
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Latest news
Latest news
T
Troy Hunt's Blog
N
News | PayPal Newsroom
Google Online Security Blog
Google Online Security Blog
Apple Machine Learning Research
Apple Machine Learning Research
N
Netflix TechBlog - Medium
小众软件
小众软件
P
Palo Alto Networks Blog
Spread Privacy
Spread Privacy
C
Cyber Attacks, Cyber Crime and Cyber Security
C
Check Point Blog
aimingoo的专栏
aimingoo的专栏
WordPress大学
WordPress大学
L
Lohrmann on Cybersecurity
L
LINUX DO - 最新话题
D
Darknet – Hacking Tools, Hacker News & Cyber Security
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
The Last Watchdog
The Last Watchdog
S
Security @ Cisco Blogs
P
Privacy International News Feed
Last Week in AI
Last Week in AI
Microsoft Security Blog
Microsoft Security Blog
T
Tailwind CSS Blog
博客园_首页
云风的 BLOG
云风的 BLOG
V
Vulnerabilities – Threatpost
D
DataBreaches.Net
Recent Announcements
Recent Announcements
酷 壳 – CoolShell
酷 壳 – CoolShell
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
罗磊的独立博客
Engineering at Meta
Engineering at Meta
Forbes - Security
Forbes - Security
T
Tenable Blog

博客园 - 天龙之吻

子页面关闭时强制刷新父页面状态 - 天龙之吻 - 博客园 Asp.net ViewState データベース連続 整理(1) LINUX成功的总结 知道自己要做啥才是最重要的开始 MAC机基础 摘自 天下维客 感想 Linux 百度知道 摘 勉強中の勉強 Linux教程目录 Active Directory简介 [转]SOA介绍 用到过的注册表项 【CSDN独家访谈】许松森:小学学历的程序员自主研发出框架级产品 BeginTrans、CommitTrans 和 RollbackTrans 方法 (ADO) [转]Rational Unified Process [转]统一建模语言UML基本概念 Python 简介[转] [转]米歇尔当选06-07赛季最佳教练
VB中的属性 Property
天龙之吻 · 2007-05-17 · via 博客园 - 天龙之吻

和C#中的Property不同,VB中的Property通过三个过程来实现:Property Get,Property Let,Property Set
分别为读值,赋值,和对象类型赋值。实现的原理和Property的作用和C#中并无二致,只是C#的形式更为统一,简洁。

[Public | Private | Friend] [Static] Property Get p_name [(arglist)] [As type]
[statements]
[p_name = expression]
[Exit Property]
[statements]
[p_name = expression]
End Property

Property Get 过程和普通的Sub过程比较相似。Get属性p_name 将会在过程内得到赋值。p_name = (value)的形式。相当于C#中的属性
Get部分: Return value ;由于p_name被赋值使用,所以应该有返回值。

[Public | Private | Friend] [Static] Property Let p_name ([arglist,] value)
[statements]
[Exit Property]
[statements]
End Property

Property Let 过程的作用是给Property对应的变量(设为p)赋值。相当于C#中Set部分:p=value;这是一个无返回值的过程。

[Public | Private | Friend] [Static] Property Set name ([arglist,] reference)
[statements]
[Exit Property]
[statements]
End Property

Properyt Set 过程和Property Let一样,只使Let是对普通变量,Set是对对象而言。VB并不是彻底的面向对象。在数据类型方面是传统的
基本的类型和对象两种。