This error normally occurs when you are refering to an item in a class which isnt an instance. SO in the following example I have defined a class with a shared member and instance method and call the method correctly and incorrectly for both. With this in mind itwould probably be that you are calling the method on a type when it requires an instance.
So you are probably missing the code which creates the instance for that collection.
Example
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim i As Integer = 0 Dim o = New Foo
i = o.bar() '//Correct for Instance Method i = Foo.bar '//Reference to a non shared member requires an object reference
Dim b As Integer = 0 b = o.Sharedbar '//Access of shared member through an instance, qualifying expression will not be evaluated b = Foo.Sharedbar '//Correct For shared method
End Sub End Class
Public Class Foo Public Function bar() As Integer Return 1 End Function
Public Shared Function Sharedbar() As Integer Return 2 End Function End Class
Note, If you look at 13:21 in the lesson, the line should read
For each currentChannel in myRssDataSet.Channel.Rows
|