C# Corner
Tech
News
Videos
Forums
Jobs
Books
Events
More
Interviews
Live
Learn
Training
Career
Members
Blogs
Challenges
Certification
Contribute
Article
Blog
Video
Ebook
Interview Question
Collapse
Feed
Dashboard
Wallet
Learn
Achievements
Network
Refer
Rewards
SharpGPT
Premium
Contribute
Article
Blog
Video
Ebook
Interview Question
Register
Login
.NET
ADO.NET
Android
ASP.NET
C#
Databases & DBA
Design Patterns & Practices
iOS
Java
OOP/OOD
SharePoint
Software Testing
Web Development
WPF
View All
2
Reply
What do u mean by Function Overloading ?
Raj Kumar M
17y
7.6k
0
Reply
Delete Row
Delete Column
Insert Link
×
Insert
Cancel
Embed YouTube Video
×
Width (%)
Height (%)
Insert
Cancel
Table Options
×
Rows
Columns
First row as header
Create Table
Insert Image
×
Selected file:
Alignment
Left
Center
Right
Select an image from your device to upload
Upload to Server
Cancel
Submit
Function overloading means put parameters in the head of the function example: int function() { int a = 3; int b = 2; return a+b; } when I invoke this function in Main method it returns 5 Main() { int x = function(); Write(x); } but if I want that user gives a and b parameters I overload the function I put a and b in the head of the function between the parentheses int function(int a, int b) { retrun a+b; } Main() { int x = function(2,5); write(x); }
Bechir Bejaoui
17y
0
When more than one function is
created
with the same name, but different is of there arguments . In other words, function names can be overloaded. A function may also have the same name as an attribute. In the casethat there is an ambiguity between a function on a complex type and an attribute of the complex type, the attribute will always be used.
Raj Kumar M
17y
0
What is Constructor?
What is diff. between abstract class and an interface?
Message