Asp 返回引用类型函数代码

编程学习 2021-07-05 10:58www.dzhlxh.cn编程入门
Asp函数返回引用类型代码,需要的朋友可以参考下。
代码如下:

<%
set studentinstance = CreateStudent()
if not isnull(studentinstance) then
Response.write("StudentId:"&studentinstance.StudentId&"<Br/>")
Response.write("StudentName:"&studentinstance.StudentName&"<Br/>")
end if

Function CreateStudent()
set stud = new Statudent
stud.StudentId=123
stud.StudentName="Eric liu"
set CreateStudent=stud
End Function

Class Statudent
private id
private name

public property let StudentId(id_)
id=id_
end property
public property get StudentId
StudentId=id
end property

public property let StudentName(name_)
name=name_
end property
public property get StudentName
StudentName=name
end property

End Class
%>

Copyright © 2016-2025 www.dzhlxh.cn 金源码 版权所有 Power by

网站模板下载|网络推广|微博营销|seo优化|视频营销|网络营销|微信营销|网站建设|织梦模板|小程序模板