i made structure into code behind of form1[Design].
struct ImagedetailsStructure
{
internal UInt32 Imagesize;
internal UInt16 versionNum;
}
then create object of struct i the form1.cs(code behind of form1[Design]).
ImageHeaderStructure IHS = new ImageHeaderStructure();
then i use this variable in the function that is also made in form1.cs.
public void Imagedetails()
{
try
{
openDialogueBox();
using (StreamReader sr = new StreamReader(path))
{
string ReadImageData = sr.ReadToEnd();
byte[] readImageDataIntoBytes = StringToByteArray(ReadImageData);
calculateDataLength = Convert.ToUInt32(readImageDataIntoBytes.Length);
}
IHS.Imagesize = calculateDataLength - 16;
IHS.versionNum = 0x00ff0f;
}
catch
{ }
}
the i called this function into class1.
and the variable of struct Imagedetailstructure is imagesize and versionnumber values i want to get.
but if i am creating object of structure and accessing the values of variable its coming 0.
but i want to get the values of IHS.ImageSize. that assigned in imagedetail function.
please help me.