in below code
public partial class UC_Home : UserControl
{
static byte[] Data_From_Class_library { get; set; }
string resultedStr { get; set; }
public UC_Home()
{
InitializeComponent();
}
public UC_Home(byte[] _data_From_Main_Form)
:this()
{
Data_From_Class_library = _data_From_Main_Form;
}
private void UC_Home_Load(object sender, EventArgs e)
{
if(Data_From_Class_library != null)
{
resultedStr = BitConverter.ToString(Data_From_Class_library);
}
}
}
as you can see i get some information and convert them to a string
in debug mode if i put a breakpoint before converting bytes to string and continue the debug with the F11 key, when i cross over the below code :
( ==> breakpoint is here )
resultedStr = BitConverter.ToString(Data_From_Class_library);
the values convert succesfully (refer to the below picture) enter image description here
but if i put a breakpoint after the below code :
resultedStr = BitConverter.ToString(Data_From_Class_library);
( ==> breakpoint is here )
when i hit the breakpoint the converted results are zero (refer to below picture)
this behavior shows that program working differently in running mode and debugging mode why is that? and how can i solve it?