This question is locked. New answers and comments are not allowed.
i get this error during the monitor:stop(); event at the application closing, i use the back key press to call this event this is the code i used
public partial class MainPage : PhoneApplicationPage
{
private IAnalyticsMonitor monitor;
private void PhoneApplicationPage_Loaded(object sender, System.Windows.RoutedEventArgs e)
{
IAnalyticsMonitor monitor = AnalyticsMonitorFactory.CreateMonitor("9A603DCBB60C4F02B30DCAB99AC9D415");
monitor.Start();
}
and further down in my code i have this event
private void Window_Closed(object sender, CancelEventArgs e)
{
monitor.Stop();
}
now on the application closing i get this error of "unhandled exception of type "System.NullReferenceException", what am i doing wrong?! and how can this be fixed or handled?
public partial class MainPage : PhoneApplicationPage
{
private IAnalyticsMonitor monitor;
private void PhoneApplicationPage_Loaded(object sender, System.Windows.RoutedEventArgs e)
{
IAnalyticsMonitor monitor = AnalyticsMonitorFactory.CreateMonitor("9A603DCBB60C4F02B30DCAB99AC9D415");
monitor.Start();
}
and further down in my code i have this event
private void Window_Closed(object sender, CancelEventArgs e)
{
monitor.Stop();
}
now on the application closing i get this error of "unhandled exception of type "System.NullReferenceException", what am i doing wrong?! and how can this be fixed or handled?