-
Dec 19th, 2011, 08:02 AM
#1
Thread Starter
New Member
Newbee question
Hello,
I'm just starting work on a sliverlight project for the first time, its an existing project that has been worked on by a co-worker.
Right so I to on of the first sections which is this:
'Login the User and store the returned values
dlgLoading.Show()
src.LoginAsync(txtUserName.Text, txtPassword.Password)
AddHandler src.LoginCompleted, AddressOf LoginClient
Now my first through is that it should be this:
'Login the User and store the returned values
dlgLoading.Show()
AddHandler src.LoginCompleted, AddressOf LoginClient
src.LoginAsync(txtUserName.Text, txtPassword.Password)
as I would think that you would always want to add the handler for the thread before running it. the code work either way. Its the same throughout the project.
So my questions are:
1. Am I right?
2. Am I just being pedantic? Or could this course problems where the LoginCompleted event had been raised before the handler is added?
Thanks,
Ash
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|