Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
The Guid attribute must be specified with the ComImport attribute
The Guid attribute must be present when using the ComImport attribute.
The following sample generates CS0596:
// CS0596.cs
using System.Runtime.InteropServices;
namespace x
{
[ComImport] // CS0596
// try the following line to resolve this CS0596
// [ComImport, Guid("00000000-0000-0000-0000-000000000001")]
public class a
{
}
public class b
{
public static void Main()
{
}
}
}