Asp 返回引用类型函数代码

Asp函数返回引用类型代码,需要的朋友可以参考下。

复制代码 代码如下:

<%
set studentinstance = CreateStudent()
if not isnull(studentinstance) then
Response.write("StudentId:"&studentinstance.StudentId&"
")
Response.write("StudentName:"&studentinstance.StudentName&"
")
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
%>

以上就是Asp 返回引用类型函数代码的详细内容,更多请关注0133技术站其它相关文章!

赞(0) 打赏
未经允许不得转载:0133技术站首页 » ASP编程