Created
April 6, 2016 02:37
-
-
Save vmussak/8edbff0ecb8e9edd9a61c82271b99f42 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int[] numeros = new int[10]; | |
//Supondo que o seu TextBox tenha o nome "txtNumero" | |
//Exemplo 01 - Conversão explícita | |
int n = (int)txtNumero.Text; | |
numeros[0] = n; | |
//Exemplo 02 - int.Parse | |
int n = int.Parse(txtNumero.Text); | |
numeros[0] = n; | |
//Exemplo 03 - Convert | |
int n = Convert.ToInt32(txtNumero.Text); | |
numeros[0] = n; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment