using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
string numberIn;
int numberOut;
numberIn = Console.ReadLine();
while (!int.TryParse(numberIn, out numberOut) || numberOut < 0)
{
Console.WriteLine("Invalid. Enter a number that's 0 or higher.");
numberIn = Console.ReadLine();
}
}
}
}
Write another function for this code using C#
221705-Oct-2013
Dag Hammarskjold
05-Oct-2013