You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
oMenuItem := MenuItem{}{ Name := "Exit", Checked := FALSE}
This one:
oMenuItem := MenuItem{}{ Name := "Exit", Checked := FALSE, Click += test}
FUNCTION Test(o AS OBJECT, e AS EventArgs) AS VOID
reports:
error XS1922: Cannot initialize type 'System.Windows.Forms.MenuItem' with a collection initializer because it does not implement 'System.Collections.IEnumerable'
error XS0747: Invalid initializer member declarator
error XS0103: The name 'Name' does not exist in the current context
error XS0747: Invalid initializer member declarator
error XS0103: The name 'Checked' does not exist in the current context
error XS0747: Invalid initializer member declarator
error XS0103: The name 'Click' does not exist in the current context
The text was updated successfully, but these errors were encountered:
https://www.xsharp.eu/forum/public-product/3619-event-registration-in-class-initializer#27330
This compiles without errors:
oMenuItem := MenuItem{}{ Name := "Exit", Checked := FALSE}
This one:
reports:
The text was updated successfully, but these errors were encountered: