J
Jeff
ASP.NET 2.0
This code gives me compile error:
if (menuitem.Text in {"Inbox", "Outbox" })
{
e.Item.Parent.ChildItems.Remove(e.Item);
}
Instead I could just have written the code below, but I think maybe using IN
is better..
if (menuitem.Text == "Inbox" || menuitem.Text == "Outbox" )
{
e.Item.Parent.ChildItems.Remove(e.Item);
}
Any suggestions on how to use IN in the if-statement above? is it possible?
Jeff
This code gives me compile error:
if (menuitem.Text in {"Inbox", "Outbox" })
{
e.Item.Parent.ChildItems.Remove(e.Item);
}
Instead I could just have written the code below, but I think maybe using IN
is better..
if (menuitem.Text == "Inbox" || menuitem.Text == "Outbox" )
{
e.Item.Parent.ChildItems.Remove(e.Item);
}
Any suggestions on how to use IN in the if-statement above? is it possible?
Jeff