Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- namespace ConsoleApp2
- {
- class Program
- {
- static void Main(string[] args)
- {
- Bicycle[] bicycles = new Bicycle[3];
- Vehicle[] vehicles = (Vehicle)bicycles;
- vehicles[0] = new Car();
- bicycles[0].RiderMyBiceycle();
- }
- }
- internal class Car : Vehicle
- {
- }
- internal class Vehicle
- {
- public Vehicle()
- {
- }
- public static implicit operator Vehicle(Bicycle[] v)
- {
- throw new NotImplementedException();
- }
- public static implicit operator Vehicle[](Vehicle v)
- {
- throw new NotImplementedException();
- }
- }
- internal class Bicycle
- {
- internal void RiderMyBiceycle()
- {
- throw new NotImplementedException();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement