Hello all, I am getting error when I trying to set value using get set method it retun null here, and from other button it is working fine. am i missing some thing? please help
private void button7_Click(object sender, EventArgs e)
{
OpenFD.Title = "Select Files";
OpenFD.Filter = "Jpg|*.jpg|Jpge|*.jpge|Gif|*.gif";
OpenFD.FileName = null;
string fileName;
if (OpenFD.ShowDialog() != DialogResult.Cancel)
{
querybuilder qu = new querybuilder();
fileName = OpenFD.FileName;
getset.big = fileName;
Object refmissing = System.Reflection.Missing.Value;
try
{
pictureBox2.Load(fileName);
}
catch (Exception ex)
{
MessageBox.Show("Error" + ex.Message.ToString());
}
}
}
class for setting big is
class getset
{
public static string photo;
public static string big
{
get { return photo; }
set { photo = value; }
}
}
and when I am trying to give out put then it return null while from other button when i am trying to set the value it work fine can any one help me please
if (getset.big != null)
{
MessageBox.Show(getset.big);
}
else
{
MessageBox.Show("Problem is in Image");
}
other button code
private void button6_Click(object sender, EventArgs e)
{
getset.big = "fddfdf";
}