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