Hi
I am trying to inherit Interface in inner class . Pls help me what is error in this
public class Vehicle
{
internal class CAR : IVehicle
{
public int GetPrice()
{
return 300000;
}
}
class BUS : IVehicle
{
public int GetPrice()
{
return 600000;
}
}
class VAN : IVehicle
{
public int GetPrice()
{
return 5000000;
}
}
public interface ICar
{
int GetCarPrice();
}
public interface IBus
{
int GetBusPrice();
}
public interface IVan
{
int GetVanPrice();
}
public interface IVehicle : ICar, IBus, IVan
{
int GetPrice();
}
class DiscountPrice
{
IVehicle CalculateDiscount(String ClassName)
{
IVehicle objIreport = null;
Type objectType = Type.GetType(ClassName);
if (objectType.IsClass)
{
objIreport = (IVehicle)Activator.CreateInstance(objectType);
}
return objIreport;
}
}
}