Jump to content

Concatenar String com Pausas


TiagoFilipe
 Share

Go to solution Solved by bruno1234,

Recommended Posts

Boa tarde pessoal,

Tenho uma dúvida e após algumas pesquisas não encontrei grande solução.

É o seguinte: Tenho uma string = Portugal e queria com que na Form aparecesse o valor da string, mas letra a letra com uma pausa de 2 segundos ( por exemplo ) entre elas.

Estou a usar um ciclo For para correr o valor da string e posteriormente a usar o Substring e mostrar o valor da string numa label.

O problema está mais de como fazer a pausa de 2 segundos.

	 string msg = "Portugal";
	 for (int i = 0; i <= msg.Length; i++)
	 {
		 string submsg = msg.Substring(0, i);
		 lblmsg.Text = submsg;		
	 }

Quero basicamente que, após executar o programa, apareça a letra "P" ( pausa de 2 segundos ) -> "O" ( pausa de 2 segundos ) , e por aí...

Obrigado a todas as respostas.

Cumprimentos.

Edited by apocsantos
geshi
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.