社区
COM/DCOM/COM+
帖子详情
Property Set和Property Let有什么区别???
hongbo163
2004-08-11 05:09:13
不都是给属性赋值的语句过程么??
...全文
151
3
打赏
收藏
Property Set和Property Let有什么区别???
不都是给属性赋值的语句过程么??
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
3 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
flyingZFX
2004-08-12
打赏
举报
回复
Let 对一般属性
Set 是对(object对象)的
chenyu5188
2004-08-12
打赏
举报
回复
Property Let主要用于一般数据类型的属性过程
Property Set主要用于对象类型的属生过程
hongbo163
2004-08-11
打赏
举报
回复
我自己测试了一下
Property Let是针对一般的属性
Property Set是针对object属性
Lazy loading - eager loading
In this article I want to discuss the lazy loading mechanism provided by NHibernate. It is recommended for maximum flexibility to define all relations in your domain as lazy loadable. This is the default behavior of NHibernate since version 1.2. But this can lead to some undesired effects if querying your data.
Let
's discuss these effects and how to avoid them. Term Paper AND Research Paper In my previous posts I showed how to prepare your system for NHibernate and how to implement a first NHibernate base application. This post is based on those two articles. Thesis AND Dissertation AND Essay The Domain
Let
's first define a simple domain. It shows part of an order entry system. I keep this model as simple as possible (a real domain model would be more complex) but it contains all aspects we want to discuss in this post. Below is the class diagram of our model We have an order entity which can be placed by a customer entity. Each order can have many order line entities. Each of the three entity types is uniquely identified by a
property
Id (surrogate key). The Mapping Files We have to write one mapping file per entity. It is recommended that you always have one mapping per file. Don't forget to
set
the Build Action of each mapping file to Embedded Resource. People often tend to forget it and the subsequent errors raised by NHibernate are not always obvious. Also do not forget to give the mapping files the correct name, that is *.hbm.xml where * denotes the placeholder for the entity name. The mapping for the Order entity might be implemented as follows
<
property
name="OrderNumber"/> <
property
name="OrderDate"/>
<
set
name="OrderLines" cascade="all-de
let
e-orphan" >
set
>
Analogous you can implement the mappings for the Customer entity
<
property
name="CompanyName"/>
and finally the mapping for the OrderLine entity.
<
property
name="Amount"/> <
property
name="ProductName"/>
ASP中
Property
Let
、
Property
Set
、
Property
Get语句的用法和
区别
Property
Let
是用来设置属性值的。
Property
Set
是用来设置对象引用的。
Property
Get 是用来获取属性值的。
在这里假设name是类NewsClass的一个属性,调用为
set
News = new NewsClass
News.name = "news_class" 这里就调用了Public
Property
Let
name这个name属性,
let
是让用户初始化name变量,一般用来初始化或重新设置类中的变量
VB
Property
中
Set
与
Let
赋值
Set
语句将一个对象赋值给一个变量,使其指向该对象,将对象引用赋给变量或属性。 语法
Set
objectvar = {[New] objectexpression | Nothing}
Set
语句的语法包含下面部分: 部分 描述 objectvar 必需的。变量或属性
Property
Let
Set
Get 属性
Let
赋值:为变量(字段)设置一个值(数值、字符串、布尔值)。例:Obj.
Property
name = x '
Let
语句经常被调用,因为我们通常会将一个对象的属性设为一个值。
Set
赋值:为变量(字段)设置一个对象(引用)。例:Obj.
Property
name = Document.Form.Input '
Set
语句很少被调用,因为我们很少会将一个对象的属性设为一个对象(但仍应保留,以防...
VBA中
Let
与
Set
的
区别
Let
与
Set
的
区别
1、在“类模块”中
Property
Let
语句 在Class块中,是给普通变量进行赋值操作的
Property
,该种
Property
将不能在其前面使用
Set
,因而将不能用户对对象变量的赋值。
Property
Set
语句 在Class块中,是给对象变量进行设置引用操作的
Property
。
Property
Get 语句 ...
COM/DCOM/COM+
863
社区成员
3,659
社区内容
发帖
与我相关
我的任务
COM/DCOM/COM+
VB COM/DCOM/COM+
复制链接
扫一扫
分享
社区描述
VB COM/DCOM/COM+
c++
技术论坛(原bbs)
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章