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

        short s = 0;

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

        ThreadStartShort tss = new ThreadStartShort();

        return(tss.Run(s));
    }
Ejemplo n.º 2
0
    public static int Main(string[] args)
    {
        // check args
        if(args.Length != 1)
        {
            Console.WriteLine("USAGE: ThreadStartShort <short>|min|max\n");
            return -1;
        }

        short s = 0;
        // check for max or min
        if(args[0].ToLower() == "max")
            s = Int16.MaxValue;
        else if(args[0].ToLower() == "min")
            s = Int16.MinValue;       
        else
            s = Convert.ToInt16(args[0]);

        ThreadStartShort tss = new ThreadStartShort();
        return tss.Run(s);
    }