0

I just discovered a weird behaviour in my application while doing a perfomance analysis with ANTS Performance Profiler:

public void set_SelectedObject(object value)
{
    if (value == null) //65ms
    {
       //do anything
    }
}

This check takes 65ms whereas other checks if objects are null take less than 0,Xms. What could be the reason for this? I thought a null-check is always constant no matter what value is passed - Does it depend on the size of my object?

4

2 に答える 2