i have 2 functions, int add(int a,int b);
double add(int a,int b); does this code implement
overloading? if not what will be the error?

Answer Posted / dhakir hussain

it will throw an error because the function overloading is
acheived by
1) changing the number of parameters
2) changing the order of parameters of different datatypes

we can't acheive function overloading by changing the
return type

Is This Answer Correct ?    26 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is managed code in .NET?

868


Can you give an example of when it would be appropriate to use a web service as opposed to a non-serviced .NET component

2171


What does cli do?

738


Explain the difference between vb and vb.net?

804


What is "common language runtime" (clr) in .net?

846


Explain attributes in dot net?

826


One user deleted one row after that another user through his dataset was trying to update same row. What will happen? How will you avoid this problem?

749


What is the procedure to add assemly to gac to make it shared one?

768


What are the types of jit?

830


What are situations when you register .NET assembly in GAC ?

876


Explain the .net framework overview?

792


What is deferred execution vs. Immediate execution in linq?

799


Explain how to stop a thread?

819


How to implement CAS in .Net?

2618


How ccw (com callable wrapper) and rcw (runtime callable wrappers) works?

803