Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static int[] values = new int[2];
- public static int[] getValue()
- {
- bool tryAgain;
- do
- {
- string line = Console.ReadLine();
- string[] svals = line.Split(new char[] { ':' });
- tryAgain = false;
- for (int i = 0; i <= values.Length; i++)
- {
- try
- {
- values[i] = Int16.Parse(svals[i]);
- }
- catch { continue; }
- }
- } while (tryAgain);
- return values;
- }
- public int conversion1()
- {
- int score= values[0];
- int book= values[1]
- //reszta programu
- }
Advertisement
Add Comment
Please, Sign In to add comment