Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- string temps = "1 -2 -8 4 5";
- string[] iTemps = temps.Split(' ');
- int arrayLength = iTemps.Length;
- string[] IntTemps = new Array[arrayLength];
- int temperature = 100;
- try
- {
- IntTemps = Array.ConvertAll(iTemps, int.Parse);
- }
- catch (FormatException)
- {
- temperature = 0;
- }
- foreach (var value in IntTemps[arrayLength])
- {
- value.CompareTo(0);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement