Partilhar via


Como: Exibir a time em um rótulo

Este exemplo exibe a time corrente em um Label.

Exemplo

private void displayTime()
{
    Label1.Text = DateTime.Now.ToShortTimeString();
}

Compilando o código

The form must contain a Labelnamed Label1.

Consulte também

Conceitos

Projetando uma interface de usuário translation from VPE for Csharp Visual

Outros recursos

Data e a controles em time

Tour guiado do Visual translation from VPE for Csharp