Exemple #1
0
 static void paramInput(string paramName, ref int variable)
 {
     try
     {
         Console.Write("Enter device " + paramName + ":");
         variable = Convert.ToInt32(Console.ReadLine());
     }
     catch
     {
         ErrorCatcher.Error(paramName);
         paramInput(paramName, ref variable);
     }
 }
Exemple #2
0
 static void paramInput(string paramName, ref TV.s_Resolution variable)
 {
     try
     {
         Console.WriteLine("Enter device " + paramName + ":");
         Console.Write("Width: ");
         variable.X_Res = Convert.ToInt32(Console.ReadLine());
         Console.Write("Height: ");
         variable.Y_Res = Convert.ToInt32(Console.ReadLine());
     }
     catch
     {
         ErrorCatcher.Error(paramName);
         paramInput(paramName, ref variable);
     }
 }