Hi,
We have a class written as below:
public static class BusyIndicatorService
{
private static bool _isBusy;
public static void SetBusyState()
{
SetBusyState(true);
}
private static void SetBusyState(bool busy)
{
if (busy != _isBusy)
{
Mouse.OverrideCursor = busy ? Cursors.Wait : null;
//bla bla bla
}
}
}
we are regularly getting below exception from production:
System.NullReferenceException: Object reference not set to an instance of an object. at
BusyIndicatorService.SetBusyState(Boolean busy) at
ApplySchedule(Object input) at
SaveSchedule(Object obj) at
We are callingSetBusyState() from ApplySchedule method but stack trace is showing SetBusyState(Boolean busy) called which is actullyprivate static void so that it cannot be called from out side of class.
Why & how stack trace is showing a private static void Method beingcalled?