'structure' : a managed class/struct cannot have any friend functions/classes/interfaces
Managed classes and structures do not allow friends. To resolve the error do not declare friends inside managed classes.
The following sample generates C3809:
#using <mscorlib.dll> __gc class A { }; __gc class B { public: friend __gc class A; // C3809 }; void main(){ }