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

推荐订阅源

Forbes - Security
Forbes - Security
A
Arctic Wolf
M
MIT News - Artificial intelligence
T
Threat Research - Cisco Blogs
T
The Exploit Database - CXSecurity.com
C
CERT Recently Published Vulnerability Notes
NISL@THU
NISL@THU
L
Lohrmann on Cybersecurity
Martin Fowler
Martin Fowler
A
About on SuperTechFans
P
Palo Alto Networks Blog
Project Zero
Project Zero
The GitHub Blog
The GitHub Blog
WordPress大学
WordPress大学
Blog — PlanetScale
Blog — PlanetScale
博客园_首页
大猫的无限游戏
大猫的无限游戏
Cisco Talos Blog
Cisco Talos Blog
P
Proofpoint News Feed
D
DataBreaches.Net
Cyberwarzone
Cyberwarzone
T
Tor Project blog
IT之家
IT之家
P
Proofpoint News Feed
Help Net Security
Help Net Security
S
Securelist
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
C
CXSECURITY Database RSS Feed - CXSecurity.com
Microsoft Azure Blog
Microsoft Azure Blog
V2EX - 技术
V2EX - 技术
K
Kaspersky official blog
Hugging Face - Blog
Hugging Face - Blog
MongoDB | Blog
MongoDB | Blog
B
Blog
N
News and Events Feed by Topic
The Cloudflare Blog
S
Schneier on Security
P
Privacy & Cybersecurity Law Blog
T
The Blog of Author Tim Ferriss
Recorded Future
Recorded Future
Last Week in AI
Last Week in AI
The Last Watchdog
The Last Watchdog
Hacker News - Newest:
Hacker News - Newest: "LLM"
L
LangChain Blog
I
InfoQ
F
Full Disclosure
The Register - Security
The Register - Security
阮一峰的网络日志
阮一峰的网络日志
H
Hacker News: Front Page
V
V2EX

博客园 - 天龙之吻

子页面关闭时强制刷新父页面状态 - 天龙之吻 - 博客园 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并不是彻底的面向对象。在数据类型方面是传统的
基本的类型和对象两种。