'method' : returnshresult attribute can only be placed on methods which are dllimport or members of a COM classic interface.
The returnshresult attribute was not used correctly.
The following sample generates CS0624:
using System; public class MainClass { [returnshresult(true)] public void mf () { // CS0624 } // try the following lines instead // [returnshresult(true), dllimport("some.dll")] // public static extern void mf(); public static void Main () { } }