Click here to Skip to main content
15,890,506 members

Comments by mehdi Saghari (Top 1 by date)

mehdi Saghari 19-Jul-11 5:15am View    
for example how can i convert this simple c# code to vb?!
private void ValidateUser()
{
LinqChatReference.LinqChatServiceClient proxy = new LinqChatReference.LinqChatServiceClient();
proxy.UserExistCompleted += new EventHandler<silverlight2chat.linqchatreference.userexistcompletedeventargs>(proxy_UserExistCompleted);
proxy.UserExistAsync(TxtUserName.Text, PbxPassword.Password);
}

void proxy_UserExistCompleted(object sender, Silverlight2Chat.LinqChatReference.UserExistCompletedEventArgs e)
{
if (e.Error == null)
{
int userID = e.Result;

if (userID != -1)
{
// go to the chatroom page
App app = (App)Application.Current;
app.UserID = userID;
app.UserName = TxtUserName.Text;
app.RedirectTo(new Chatroom());
}
else
{
TxtbNotfound.Visibility = Visibility.Visible;
}
}
}