detect current pairs

 
anyone please help me, i want to create "object" based on current pairs but how to detect it, cause when try with method "Switch" like switching time below it failed.

//////////////////-----Sample to auto switch time-----------////////////////////////////
string PeriodToText()
{
   switch (Period())
   {
      case 1:
            return("1 Minutes");
            break;
      case 5:
            return("5 Minutes");
            break;
      case 15:
            return("15 Minutes");
            break;
      case 30:
            return("30 Menit");
            break;
      case 60:
            return("1 Hour);
            break;
      case 240:
            return("4 Hour");
            break;
      case 1440:
            return("1 day");
            break;
      case 10080:
            return("1 Week");
            break;
      case 43200:
            return("1 month");
            break;
   }
}



thanks

 
Your sample code will not compile.

You have a little error.

Correct it and it should work just fine.