GoogleCloudSamples.QuickStart.Main C# (CSharp) Method

Main() public static method

public static Main ( string args ) : int
args string
return int
        public static int Main(string[] args)
        {
            QuickStart quickStart = new QuickStart();
            return quickStart.Run(args);
        }

Same methods

QuickStart::Main ( string args ) : void

Usage Example

        /// <summary>Runs StorageSample.exe with the provided arguments</summary>
        /// <returns>The console output of this program</returns>
        private RunResult Run(params string[] arguments)
        {
            Console.Write("QuickStart.exe ");
            Console.WriteLine(string.Join(" ", arguments));
            var standardOut = Console.Out;

            using (var output = new StringWriter())
            {
                Console.SetOut(output);
                try
                {
                    return(new RunResult()
                    {
                        ExitCode = QuickStart.Main(arguments),
                        Stdout = output.ToString()
                    });
                }
                finally
                {
                    Console.SetOut(standardOut);
                }
            }
        }
All Usage Examples Of GoogleCloudSamples.QuickStart::Main