C# to VB question
- by Jim
Hi,
I can achieve in VB what the following C# snippet does but it seems very clunky since I perform a Linq query to obtain the events for the relevant user. Is there a neat way?
ctx.FetchEventsForWhichCurrentUserIsRegistered((op) =>
{
if (!op.HasError)
{
var items = op.Value;
_currentUserRegisteredEventIds = new HashSet<int>(items);
UpdateRegistrationButtons();
}
}, null);
}
else
{
_currentUserRegisteredEventIds = null;
UpdateRegistrationButtons();
}