当前位置: 移动技术网 > IT编程>开发语言>Asp > Asp 返回引用类型函数代码

Asp 返回引用类型函数代码

2017年12月12日  | 移动技术网IT编程  | 我要评论
复制代码 代码如下:

<%
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
%>

如对本文有疑问, 点击进行留言回复!!

相关文章:

验证码:
移动技术网