Skip to content

Instantly share code, notes, and snippets.

@lgolubyev
Created May 25, 2021 11:07
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 lgolubyev/e5ecc519a45aabbbd4f806296d77ce09 to your computer and use it in GitHub Desktop.
Save lgolubyev/e5ecc519a45aabbbd4f806296d77ce09 to your computer and use it in GitHub Desktop.
abstract class Weather
{
public abstract Temperature GetTemperature();
}
class Spain : Weather
{
public override Celsius GetTemperature() => new Celsius();
}
class USA : Weather
{
public override Farenheit GetTemperature() => ne Farenheit();
}
class Temperature{ }
class Celsius{ }
class Farenheit{ }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment