Home

[Bug v5.02.03]: COMException while debugging

Hi !

please paste the code below in a C# Program editor window. Then hit F10 (to step to the first line) and then F11 (to step into the call of PluginDataStructFromXmlElement.. method). An System.Runtime.InteropServices.COMException is thrown. Can you repro this?

Thanks
KarloX

----------------------------------------------------

public interface IInitialize
{
void SetDefaults();
}

public struct Parameter : IInitialize
{
public int i;
public void SetDefaults()
{
i = 42;
}
}

protected T PluginDataStructFromXmlElement(XmlElement xmlElement) where T : IInitialize
{
var retval = default(T);
retval.SetDefaults();
return retval;
}

void Main()
{
var p = PluginDataStructFromXmlElement(null);
p.Dump();
}

Comments

Sign In or Register to comment.