Beginning C# - Part 12: Constants and Enumerations | Ray Wenderlich

In this episode, you'll learn how to use to constants and enumerations in your code to make it safer and easier to understand.

This is a companion discussion topic for the original entry at

I think this solution of the challenge could be useful for beginners too:

public enum DayOfWeek {Monday=1, Tuesday, Wednesday, Thursday,Friday, Saturday,Sunday};
public DayOfWeek currentDay;

case 1:
Debug.Log (“You can fall apart”);
case 2:
case 3:
Debug.Log (“Break my heart”);
case 4:
Debug.Log (" Doesn’t even start");
case 5:
Debug.Log (“I’m in love”);
case 6:
Debug.Log (“Wait”);
case 7:
Debug.Log (“Always come too late”);

1 Like

Nice job on that one!

Dear Mr. Moakley,

Hello there! I just wanted to take the time to thank you for the very obvious effort you put into these free video tutorials. Until I stumbled across this series, scripting was the one element of Unity that totally went over my head. Thank you for making programming in C# accessible and fun for even the least left brained people! Keep up the excellent work and cheers :smiley:

Best regards,
Fiona Barton

Great song :stuck_out_tongue: