Mit dieser Methode kann das Sternzeichen bestimmt werden.
/// <summary>
/// Gets the star sign.
/// </summary>
/// <param name="candidate">The candidate</param>
/// <returns></returns>
string GetStarSign(DateTime candidate)
{
switch (Convert.ToInt32(candidate.Month))
{
case 1:
if (candidate.Day >= 20 && candidate.Day <= 31)
return "Widder";
else
return "Steinbock";
case 2:
if (candidate.Day >= 1 && candidate.Day <= 19)
return "Fische";
else
return "Wassermann";
case 3:
if (candidate.Day >= 1 && candidate.Day <= 20)
return "Fische";
else
return "Widder";
case 4:
if (candidate.Day >= 1 && candidate.Day <= 19)
return "Widder";
else
return "Stier";
case 5:
if (candidate.Day >= 1 && candidate.Day <= 20)
return "Stier";
else
return "Zwillinge";
case 6:
if (candidate.Day >= 1 && candidate.Day <= 20)
return "Zwillinge";
else
return "Krebs";
case 7:
if (candidate.Day >= 1 && candidate.Day <= 22)
return "Krebs";
else
return "Löwe";
case 8:
if (candidate.Day >= 1 && candidate.Day <= 22)
return "Löwe";
else
return "Jungfrau";
case 9:
if (candidate.Day >= 1 && candidate.Day <= 22)
return "Jungfrau";
else
return "Waage";
case 10:
if (candidate.Day >= 1 && candidate.Day <= 22)
return "Waage";
else
return "Skorpion";
case 11:
if (candidate.Day >= 1 && candidate.Day <= 21)
return "Skorpion";
else
return "Schütze";
case 12:
if (candidate.Day >= 1 && candidate.Day <= 21)
return "Schütze";
else
return "Steinbock";
}
return string.Empty;
}
3 Kommentare zum Snippet