Exemplo n.º 1
0
    public static int Main(string[] args)
    {
        // check args
        if (args.Length != 1)
        {
            Console.WriteLine("USAGE: ThreadStartDouble <decimal>|min|max\n");
            return(-1);
        }

        decimal d = 0M;

        // check for max or min
        if (args[0].ToLower() == "max")
        {
            d = Decimal.MaxValue;
        }
        else if (args[0].ToLower() == "min")
        {
            d = Decimal.MinValue;
        }
        else
        {
            d = Convert.ToDecimal(args[0]);
        }
        ThreadStartDecimal tsd = new ThreadStartDecimal();

        return(tsd.Run(d));
    }
Exemplo n.º 2
0
    public static int Main(string[] args)
    {
        // check args
        if(args.Length != 1)
        {
            Console.WriteLine("USAGE: ThreadStartDouble <decimal>|min|max\n");
            return -1;
        }

        decimal d = 0M;
        // check for max or min
        if(args[0].ToLower() == "max")
            d = Decimal.MaxValue;
        else if(args[0].ToLower() == "min")
            d = Decimal.MinValue;       
        else
            d = Convert.ToDecimal(args[0]);
        ThreadStartDecimal tsd = new ThreadStartDecimal();
        return tsd.Run(d);
    }