[c#] An exception of type 'System.NullReferenceException' occurred in myproject.DLL but was not handled in user code