Common.argContains C# (CSharp) Метод

argContains() публичный статический Метод

public static argContains ( String args, String str ) : Boolean
args String
str String
Результат Boolean
    public static Boolean argContains( String [] args, String str )
    {
        for ( int i = 0; i < args.Length; i += 1 )
        {
            if ( args[i].Equals( str ) )
            {
                return true;
            }
        }
        return false;
    }
    public static String argGetArg( String [] args, String str )

Usage Example

Пример #1
0
    public static void Main(String [] args)
    {
        Boolean       bolResult = false;
        Co1658ctor_Df cbX       = new Co1658ctor_Df();

        if (Common.argContains(args, "/?"))
        {
            printUsage();
            Environment.ExitCode = 0;
            return;
        }
        try
        {
            bolResult = cbX.runTest();
        }
        catch (Exception exc_main)
        {
            bolResult = false;
            Console.WriteLine(s_strTFAbbrev + "  FAiL!  Error Err_9999zzz!  Uncaught Exception caught in main()");
            Console.WriteLine("exc_main==" + exc_main.ToString());
        }
        if (!bolResult)
        {
            Console.WriteLine("FullerPath=" + s_strTFPath + " " + s_strTFName);
            Console.WriteLine(" ");
            Console.WriteLine("FAiL!  " + s_strTFAbbrev);
            Console.WriteLine(" ");
        }
        if (bolResult == true)
        {
            Environment.ExitCode = 0;
        }
        else
        {
            Environment.ExitCode = 1;
        }
    }