Jump to content

Recommended Posts

Posted

Boa tarde comunidade, já tentei de várias formas, mas como ando a usar MDI parent não me dá erro nenhum, apenas me abre o outro form ou até mesmo nenhum...

if (comboBox1.SelectedIndex < 0)
	    {
		    MessageBox.Show("Erro\r\nSelecione Utilizador.");
	    }
	    else
	    {
		    int i = comboBox1.SelectedIndex;
		    ClienteGestao cli = (ClienteGestao)dados[i];
		    TextWriter txt = new StreamWriter("id.txt");
		    txt.WriteLine(i);
		    this.Close();
	    }

O código é esse acima, já tentei de tudo (o ficheiro existe) está tudo operacional o que é necessário para escrever, só não me está a escrever no ficheiro (desta maneira não dá qualquer tipo de anómalia apenas não escreve).

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
×
×
  • 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.