Asp 返回引用类型函数代码
程序员文章站
2022-03-14 10:42:28
复制代码 代码如下:<% set studentinstance = createstudent() if not isnull(studentinstance) t...
复制代码 代码如下:
<%
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
%>