VB
An object-oriented programming language developed by Microsoft that is implemented on the .NET Framework. Previously known as Visual Basic .NET.
2,568 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I'm dealing with something strange - earlier I was able to list all my data in a list view control using the following code: Now after couple day I get an InvalidOperationsException.
If wresults.WorkItems.Any Then
'Dim wref As IEnumerable(Of WorkItemReference)
LV_WIT.View = View.Details
For wit = 0 To wresults.WorkItems.Count - 1
Debug.Print("Work Item id:- " & wresults.WorkItems(wit).Id) [This prints well]
LV_WIT.Items.Add(wresults(wit).Id)
Next
End If
I figured that there was a overlap of two API's one after the other, which was causing this exception. So once I removed the other declaration it was all back to normal.
Dim results = Await WClient.QueryByWiqlAsync(Query)
Dim f = Await WClient.GetWorkItemAsync(11).ConfigureAwait(False) '(this was the problematic declaration as they were under the same thread I believe. Once I removed it, everything was ok