SHARE
TWEET

Untitled

a guest Oct 10th, 2019 82 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. namespace ConsoleApp2
  2. {
  3.     class Program
  4.     {
  5.  
  6.         static void Main(string[] args)
  7.         {
  8.             Bicycle[] bicycles = new Bicycle[3];
  9.             Vehicle[] vehicles = (Vehicle)bicycles;
  10.             vehicles[0] = new Car();
  11.             bicycles[0].RiderMyBiceycle();
  12.         }
  13.     }
  14.  
  15.     internal class Car : Vehicle
  16.     {
  17.     }
  18.  
  19.     internal class Vehicle
  20.     {
  21.         public Vehicle()
  22.         {
  23.         }
  24.  
  25.         public static implicit operator Vehicle(Bicycle[] v)
  26.         {
  27.             throw new NotImplementedException();
  28.         }
  29.  
  30.         public static implicit operator Vehicle[](Vehicle v)
  31.         {
  32.             throw new NotImplementedException();
  33.         }
  34.     }
  35.     internal class Bicycle
  36.     {
  37.         internal void RiderMyBiceycle()
  38.         {
  39.             throw new NotImplementedException();
  40.         }
  41.     }
  42. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top