This repository was archived by the owner on Jul 26, 2023. It is now read-only.

Description
Hello, currently MENUITEMINFO.Create() is instance method and if I need to create the struct with correct size, I need to do this:
MENUITEMINFO mii = new MENUITEMINFO();
MENUITEMINFO correctMii = mii.Create();
Currently, I don't see any advantage of non-static .Create() because it doesn't utilize original struct's state:
public MENUITEMINFO Create()
{
return new MENUITEMINFO
{
cbSize = Marshal.SizeOf(typeof(MENUITEMINFO))
};
}
I think that it will be more convenient to make this method static to avoid mii declaration (or provide alternative way to initialize the struct):
MENUITEMINFO mii = MENUITEMINFO.Create();