0
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace ProgramacaoParalela
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Pressione ENTER para iniciar");
Console.ReadLine();
// Invocar os métodos que vamos executar
Parallel.Invoke(
new Action(exibirDias),
new Action(exibirMeses),
);
// Aguardar a continuação do programa
Console.WriteLine("\nO método Main foi encerrado. Tecle Enter");
Console.ReadLine();
}
static void exibirDias()
{
string[] diasArray = { "Segunda", "Terça", "Quarta","Quinta", "Sexta", "Sábado", "Domingo" };
foreach (string dia in diasArray)
{
Console.WriteLine("Dia da semana: {0}", dia);
Thread.Sleep(500);
}
}
static void exibirMeses()
{
string[] messArray = { "Jan", "Fev", "Mar", "Abr","Mai", "Jun", "Jul",
"Ago", "Set", "Out", "Nov", "Dec" };
foreach (string mes in messArray)
{
Console.WriteLine("Mês : {0}", mes);
Thread.Sleep(500);
}
}
}
}
In this code above I am not able to see where my ) that the compiler accuses with the following message:
main.Cs(22,11): error CS1525: Unexpected Symbol `)'
Thank you! Beginner error.
– Fenix
@If Fenix resolved could accept m single answer :)
– Amadeu Antunes
was hoping to spend the 5 minutes! Done
– Fenix