All articles| All Pictures| All Softwares| All Video| Go home page| Write articles| Upload pictures

Reading number is top 10 articles
最具web2.0意义的豆瓣网站的几点价值_JavaScript技术_编程技术
Asp.net2.0实现Word转换Html,同时分享系列笑话_[Asp.Net教程]
当ASP.NET撞上JSF之构建应用程序的异同_[Asp.Net教程]
实例:新手如何使用PHP创建RSS阅读器_php资料_编程技术
二十二 声明 Declarations_[Html教程]
asp.net新闻标题后加new图片_[Asp.Net教程]
SQL Server数据库中bit字段类型使用时的注意事项
你可能已经知道或者不知道的ASP.NET,2.0技巧_[Asp.Net教程]
PHP学习宝典-第八章(一)_[PHP教程]
新标准的熟悉和入门_[Html教程]
Reading number is top 10 pictures
Send some Valentine's day cartoon
Kim jong il's mistress, national beauty JinYuJi actor1
Soong ching ling's former residence1
漂亮脸蛋魔鬼身材2
BingBingFan apple dew point photo gallery1
西游四格漫画(二)
开始让人感动,后来......
Group of female porn in 《westwards》, uninhibited woman threatened to not the bottom line2
红楼梦金陵十二钗(1)
Park waits to have her picture taken exposed
Download software ranking
Sora aoi, the nurse, uniform ,nursing assistant
Tram sex maniac 2 (H) rar bag15
Tram sex maniac 2 (H) rar bag9
dreamweaver8中文版
Boxer's Top ten classic battle2
致我们终将逝去的青春
Unix video tutorial1
Ashlynn Video3
matrix1
C#编程思想
归海一刀 published in(发表于) 2014/1/30 1:33:59 Edit(编辑)
实例了解Asp.Net的继承和多态性_[Asp.Net教程]

实例了解Asp.Net的继承和多态性_[Asp.Net教程]

实例了解Asp.Net的继承和多态性_[Asp.Net教程]

















许多学习Asp.Net的新人对Asp.Net继承和多态性不是特别的了解,但其在编程中有重要作用,为了帮助大家学习,我们作了这个例子,以实例来说明,代码比较简单。

TestProfileClass2.aspx 页面文件




















<%@PageLanguage="C#"ContentType="text/html"ResponseEncoding="gb2312"Src="profile2.cs"%>
<%@ImportNamespace="shai"%>




publicvoidPage_Load(Objectsender,EventArgse)
{
Profileprofile=newProfile();
message.InnerHtml+="ProfileClass
";
message.InnerHtml+="Firstname:"+profile.getFirstname()+"
";
message.InnerHtml+="Lastname:"+profile.getLastname()+"
";
message.InnerHtml+="Phone:"+profile.getPhonenumber()+"

";

profile.save();

ExtendedProfileextendedprofile=newExtendedProfile();
message.InnerHtml+="ExtendedProfileClass
";
message.InnerHtml+="Firstname:"+profile.getFirstname()+"
";
message.InnerHtml+="Lastname:"+profile.getLastname()+"
";
message.InnerHtml+="Phone:"+extendedprofile.getPhonenumber()+"
";
message.InnerHtml+="Address1:"+extendedprofile.getAddress1()+"
";
message.InnerHtml+="Address2:"+extendedprofile.getAddress2()+"
";
message.InnerHtml+="City:"+extendedprofile.getCity()+"
";
message.InnerHtml+="State:"+extendedprofile.getState()+"
";
message.InnerHtml+="Postal:"+extendedprofile.getPostal()+"
";
message.InnerHtml+="Description:"+extendedprofile.getDescription()+"
";

extendedprofile.save();
}





简单的继承、多态例子




objectoutput:















































添加到del.icio.us 添加到新浪ViVi 添加到百度搜藏 添加到POCO网摘 添加到天天网摘365Key 添加到和讯网摘 添加到天极网摘 添加到黑米书签 添加到QQ书签 添加到雅虎收藏 添加到奇客发现 diigo it 添加到饭否 添加到飞豆订阅 添加到抓虾收藏 添加到鲜果订阅 digg it 貼到funP 添加到有道阅读 Live Favorites 添加到Newsvine 打印本页 用Email发送本页 在Facebook上分享


Disclaimer Privacy Policy About us Site Map

If you have any requirements, please contact webmaster。(如果有什么要求,请联系站长)
Copyright ©2011-
uuhomepage.com, Inc. All rights reserved.