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

        long l = 0;

        // check for max or min
        if (args[0].ToLower() == "max")
        {
            l = Int64.MaxValue;
        }
        else if (args[0].ToLower() == "min")
        {
            l = Int64.MinValue;
        }
        else
        {
            l = Convert.ToInt64(args[0]);
        }

        ThreadStartLong tsl = new ThreadStartLong();

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

        long l = 0;
        // check for max or min
        if(args[0].ToLower() == "max")
            l = Int64.MaxValue;
        else if(args[0].ToLower() == "min")
            l = Int64.MinValue;       
        else
            l = Convert.ToInt64(args[0]);

        ThreadStartLong tsl = new ThreadStartLong();
        return tsl.Run(l);
    }