How could I shorten this if statment to make the code look more clean (preferably to one line)
public string GetCertification()
{
if (copiesSold < 200000)
{
return null;
}
if (copiesSold < 400000)
{
return "Silver";
}
if (copiesSold < 600000)
{
return "Gold";
}
return "Platinum";
}
}
}
Aucun commentaire:
Enregistrer un commentaire