Skip to content

Instantly share code, notes, and snippets.

@vmussak
Created April 17, 2016 20:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vmussak/564925b017f3f0c7f0cf5e72bafd2d4a to your computer and use it in GitHub Desktop.
Save vmussak/564925b017f3f0c7f0cf5e72bafd2d4a to your computer and use it in GitHub Desktop.
int[] numeros = new int[10];
//Preenchendo o Array
//Isso vc vai fazer com o TextBox e o Botão
for (int i = 0; i < 10; i++)
numeros[i] = i;
//Mostrando só os numeros impares
//Considere a variavel "richTextBox" como o seu "richTextBox.Text"
foreach (int item in numeros)
{
if (item%2 != 0)
richTextBox += item + "\n";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment