Skip to content

Instantly share code, notes, and snippets.

@IntegerMan
Created October 9, 2019 03:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save IntegerMan/da39aa176cf6036a8e099b4727affa8a to your computer and use it in GitHub Desktop.
Save IntegerMan/da39aa176cf6036a8e099b4727affa8a to your computer and use it in GitHub Desktop.
VehicleBase myVehicle = GetVehicle();
return myVehicle switch {
Tank { Movement = TankType.Treads } => 100000M,
Tank => 75000M,
RocketShip => 99999999M,
Car { Color = Colors.Red } => 21999M,
Car => 20000M,
_ => 1000M
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment