What is the best example of Function Overloading?

 Posted by vishalneeraj-24503 on 11/29/2013 | Category: OOPS Interview questions | Views: 3113 | Points: 40
Answer:

Overloaded Constructor is the best example of Function Overloading.

For ex:-

In VB.Net
Public Class Person

Sub New()
End Sub

Sub New(ByVal person_id As Integer)
End Sub
End Class


In C#
public class Person

{
public Person()
{
}

public Person(int person_id)
{
}
}


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response