Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.