I added an enum to my interface to better describe some error code, but the code generator resulted in invalid code:
using System;
using System.Runtime.Serialization;
namespace PropertyBagImmortalInterfaces {
public struct PropertyBagResult
{
public Int32 value__;
public PropertyBagResult Success;
public PropertyBagResult KeyNotFound;
public PropertyBagResult KeyExists;
public PropertyBagResult ValueNotChanged;
}
}
1>PropertyBagResult.cs(7,30,7,37): error CS0523: Struct member 'PropertyBagResult.Success' of type 'PropertyBagResult' causes a cycle in the struct layout