C# to VB conversion query
Posted
by Jim
on Stack Overflow
See other posts from Stack Overflow
or by Jim
Published on 2010-06-10T11:06:58Z
Indexed on
2010/06/10
11:13 UTC
Read the original article
Hit count: 384
vb
|c#-to-vb.net
This C# code successfully gets the 2 relevant records into _currentUserRegisteredEventIds:
ctx.FetchEventsForWhichCurrentUserIsRegistered((op) =>
{
if (!op.HasError)
{
var items = op.Value;
_currentUserRegisteredEventIds = new HashSet<int>(items);
UpdateRegistrationButtons();
}
}, null);
but VB code trying to do the same thing has nothing in _currentUserRegisteredEventIds:
ctx.FetchEventsForWhichCurrentUserIsRegistered(Function(op)
If Not op.HasError Then
Dim items = op.Value
_currentUserRegisteredEventIds = New HashSet(Of Integer)(items)
UpdateRegistrationButtons()
End If
Any help appreciated.
© Stack Overflow or respective owner