A property or method call cannot include a reference to a private object, either as an argument or as a return value

 

Updated: July 20, 2015

For the latest documentation on Visual Studio 2017 RC, see Visual Studio 2017 RC Documentation.

Among the possible causes of this error are:

  • A client invoked a property or method of an out-of-process component and attempted to pass a reference to a private object as one of the arguments.

  • An out-of-process component invoked a call-back method on its client and attempted to pass a reference to a private object.

  • An out-of-process component attempted to pass a reference to a private object as an argument of an event it was raising.

  • A client attempted to assign a private object reference to a ByRef argument of an event it was handling.

To correct this error

  1. Remove the reference.

Private

Show: