惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

C
CXSECURITY Database RSS Feed - CXSecurity.com
阮一峰的网络日志
阮一峰的网络日志
博客园_首页
WordPress大学
WordPress大学
腾讯CDC
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
The Last Watchdog
The Last Watchdog
AWS News Blog
AWS News Blog
T
Threat Research - Cisco Blogs
Security Archives - TechRepublic
Security Archives - TechRepublic
博客园 - Franky
L
Lohrmann on Cybersecurity
H
Heimdal Security Blog
GbyAI
GbyAI
The Hacker News
The Hacker News
Engineering at Meta
Engineering at Meta
F
Full Disclosure
Recorded Future
Recorded Future
T
The Exploit Database - CXSecurity.com
Blog — PlanetScale
Blog — PlanetScale
G
Google Developers Blog
S
Secure Thoughts
D
Docker
T
The Blog of Author Tim Ferriss
AI
AI
H
Help Net Security
L
LINUX DO - 热门话题
TaoSecurity Blog
TaoSecurity Blog
Y
Y Combinator Blog
B
Blog
www.infosecurity-magazine.com
www.infosecurity-magazine.com
NISL@THU
NISL@THU
有赞技术团队
有赞技术团队
Schneier on Security
Schneier on Security
Recent Commits to openclaw:main
Recent Commits to openclaw:main
罗磊的独立博客
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Scott Helme
Scott Helme
小众软件
小众软件
P
Proofpoint News Feed
宝玉的分享
宝玉的分享
J
Java Code Geeks
博客园 - 叶小钗
M
MIT News - Artificial intelligence
Cloudbric
Cloudbric
T
Troy Hunt's Blog
T
Tor Project blog
量子位
博客园 - 司徒正美

博客园 - Nikos

又是一年,写个总结吧... 5.23 随笔 - Nikos - 博客园 Feb.19 Come back Jan.17 wtiring 地址 笔记 认识 C#中使用ref和out (转) ASP.net 验证码(C#) (转)-----很实用的一个东西 穿过代理服务器取远程用户真实IP地址 深入理解.NET内存回收机制 (转) 语言的发展就是库的发展 保证你现在和未来不失业的十种关键技术(转) 再议Exception(转) December 4, 2005 说明 建立您自己的、支持选项卡的 Web 浏览器(转) 针对 Java 开发人员的 C# 编程语言(转) 从 C++ 向 C# 迁移(转) Visual Studio Team System单服务器部署指南(转)
贴板--c#.net中类的覆写(OverRide)
Nikos · 2005-12-11 · via 博客园 - Nikos

Posted on 2005-12-11 20:07  Nikos  阅读(196)  评论()    收藏  举报

c#.net中类的覆写(OverRide) public class MyBase { public virtual string Meth1() { return "MyBase-Meth1"; } public virtual string Meth2() { return "MyBase-Meth2"; } public virtual string Meth3() { return "MyBase-Meth3"; } } class MyDerived : MyBase { // Overrides the virtual method Meth1 using the override keyword: public override string Meth1() { return "MyDerived-Meth1"; } // Explicitly hide the virtual method Meth2 using the new // keyword: public new string Meth2() // ???这么奇怪的方式 { return "MyDerived-Meth2"; } // Because no keyword is specified in the following declaration // a warning will be issued to alert the programmer that // the method hides the inherited member MyBase.Meth3(): public string Meth3() //???同样奇怪的 { return "MyDerived-Meth3"; } public static void Main() { MyDerived mD = new MyDerived(); MyBase mB = (MyBase) mD; System.Console.WriteLine(mB.Meth1()); System.Console.WriteLine(mB.Meth2()); System.Console.WriteLine(mB.Meth3()); } } 作者Blog:http://blog.csdn.net/downmoon/