using System;
using System.Collections.Generic;
using System.Text;
namespace prjParametros
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Funcionanado!!!");
Console.WriteLine("Hello World");
Console.WriteLine(http://aulaweb.com.es);
Console.WriteLine(" ");
Console.WriteLine("RECORRIENDO PARAMETROS MEDIANTE FOR");
for (int i = 0; i < args.Length; i++)
{
Console.WriteLine("El parmetro {0} es:", i + 1);
Console.WriteLine(args[i].ToString());
}
Console.WriteLine(" ");
Console.WriteLine("RECORRIENDO PARAMETROS MEDIANTE FOREACH");
foreach (string arg in args)
{
Console.WriteLine("Argumento: {0}", arg);
}
Console.ReadLine();
}
}
}
namespace prjParametros
{
class Program
{
static int Main(string[] args)
{
Console.WriteLine("Devoliendo un valor");
return 1;
}
}
}
@echo off
:Parametros
prjParametros
@if "%ERRORLEVEL%"=="1" goto bien
:fallo
echo Aplicación devolvió valor = %ERRORLEVEL%
goto fin
:bien
echo Aplicación devolvió valor = %ERRORLEVEL%
goto fin
:fin
echo Bye!.