'object' : cannot create a temporary of a managed class
You cannot create temporary, stack-based objects for managed classes. The compiler attempted to create a temporary object that is not directly mentioned in the code. This temporary object is created on the stack because there is no call to new.
The following sample generates C3257:
#using <mscorlib.dll> __gc class X { public: X(); X(int i) { X(); // C3257 } }; void main() { }