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

        byte b = 0x0;

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

        ThreadStartByte tsb = new ThreadStartByte();

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

        byte b = 0x0;
        // check for max or min
        if(args[0].ToLower() == "max")
            b = Byte.MaxValue;
        else if(args[0].ToLower() == "min")
            b = Byte.MinValue;       
        else
            b = Convert.ToByte(args[0]);

        ThreadStartByte tsb = new ThreadStartByte();
        return tsb.Run(b);
    }