I wan to call a method from two diffrent method, but the object which I want to pass is different in both the methods. lets assume an example below.
Public string GetCarDetails(Car carObj)
{
string price=GetCarPrice(carObj);
return price;
}
Public string GetBikePrice(Bike bikeObj)
{
VechileDetails obj = new VechileDetails()
string price=obj.GetBikePrice(bikeObj);
return price;
}
I want to create GetBikePrice method in VechileDetails class which can accept both the object car and bike.
I hope you guys got my problem.
Thanks.

Piyush PansuriyaRank #454 · 5.5K reputationPosted Sep 12, 2019, 8:03 PM EDT
Madan ShekarRank #428 · 5.9K reputationPosted Sep 12, 2019, 8:07 PM EDT
Posted Sep 13, 2019, 2:30 AM EDT
Jaimin ShethiyaRank #177 · 13.7K reputationPosted Oct 9, 2019, 2:15 AM EDT
can you please used below code for your requirement.
let me know if you needed any other help from myside.
Thanks