函数重载和函数重写之间的区别是什么 [英] What is the differene between function overloading and function overriding
本文介绍了函数重载和函数重写之间的区别是什么的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,
只是我想知道
1>函数重载和函数重写之间有什么区别
2>什么是多态
解决方案
函数重载和函数重写之间的区别是:
当你崩溃时有几个具有相同名称的功能,但它可以采取几种不同的输入:
http:// en .wikipedia.org / wiki / Function_overloading [ ^ ]
覆盖替换现有函数并在继承基类时发生:
http://en.wikipedia.org/wiki/Method_overriding [ ^ ]
多态性 [ ^ ]
函数重载具有一组具有相同名称但参数不同的函数。 (技术上在.NET中,但不是C#返回类型计数)。覆盖是在子类中具有一个覆盖父类中的函数的函数。
多态性需要更多的讨论,但在软件开发中是一个重要的事情。至少在过去的二十年里。如建议的那样 - 使用Google。
重载
C#.NET中的运算符重载
覆盖:
[ ^ ] http://www.c-sharpcorner.com/uploadfile / puranindia / polymorphism-in-C-Sharp / [ ^ ]
继承介绍,C#中的多态性 [ ^ ]
Hi to all,
just i want to know
1>What is the differene between function overloading and function overriding
2> what is polymorphism解决方案The difference between function overloading and function overriding is:
Overloding is when you have several functions with the same name, but that it can take several different inputs:
http://en.wikipedia.org/wiki/Function_overloading[^]
Overrides replaces an existing function and happens in inheriting a base class:
http://en.wikipedia.org/wiki/Method_overriding[^]
Polymorphism[^]
Function overloading is having a set of functions with the same name but different parameters. (Technically in .NET but not C# return type counts also). Overriding is having a function in a child class that overrides one in a parent class.
Polymorphism needs more of a discussion but had been a major thing in software development for at least the last twenty years. As suggested - use Google.
overloading
Operator Overloading in C# .NET
overriding:
[^]http://www.c-sharpcorner.com/uploadfile/puranindia/polymorphism-in-C-Sharp/[^]
Introduction to inheritance, polymorphism in C#[^]
这篇关于函数重载和函数重写之间的区别是什么的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文