Program.Foo C# (CSharp) Method

Foo() public static method

public static Foo ( String args ) : int
args String
return int
     public static int Foo(String[] args)
     {
         int sum = 5;
         for(int i = 0; args != null && i < args.Length; i++)
         {
             sum += Int32.Parse(args[i]);
         }
         return sum;
    }
}

Usage Example

Esempio n. 1
0
    static void Main()
    {
        var program = new Program();

        try
        {
            Console.WriteLine("Hello!");
        }
        finally
        {
            program.Foo();
            program.Bar();
        }

        Console.WriteLine("<%END%>");
    }
All Usage Examples Of Program::Foo