Click here to Skip to main content
15,895,370 members
Articles / Programming Languages / C#

C# use of unassigned variable error

Rate me:
Please Sign up or sign in to vote.
0.00/5 (No votes)
14 Jan 2013CPOL 4.2K  
private void button1_Click(object sender, EventArgs e){ Funcionario Func = new Funcionario(Func.getNome(), Func.getSexo(), Func.getDataNascimento(), Func.getBi(), ...

Alternatives

Members may post updates or alternatives to this current article in order to show different approaches or add new features.

Please Sign up or sign in to vote.
14 Jan 2013Jibesh
In this case the instance Func will be created/initialized only when the construction is done, but you are invoking a method of the instance Func before its construction through Fun.getName(),getSexo etc .I am not sure what you are trying to do here. Looks like you are confused with the...
Please Sign up or sign in to vote.
15 Jan 2013mibetty
namespace Zoo{ public partial class FuncionarioForm : Form { List Lfunc; List LAnimal; public FuncionarioForm() { InitializeComponent(); Lfunc = new List(); LAnimal...

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Portugal Portugal
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions