|
-
Jun 10th, 2016, 05:36 PM
#11
Thread Starter
PowerPoster
Re: Beginner trying to learn SQLite database
SS, I need to ask about something that's puzzling me. Because you use what's below in your code, I tried to find some references to it (IEnumerator, IEnumerable) Here's the first thing I found. I tried searching through your code, but found 'none' of this.
First, we need to define a class to implement IEnumerable. Here's a start ...
Public Class Parties
Implements IEnumerator, IEnumerable
Public Function GetEnumerator() _
As IEnumerator _
Implements IEnumerable.GetEnumerator
Return CType(Me, IEnumerator)
End Function
This satisfies the requirement of IEnumerable because it implements GetEnumerator. How does it do that? It simply uses the CType operator to change the class itself into an IEnumerator and returns it.
Would you mind filling in some blanks? On the first sentence of the quote, it says to first create a class, but I saw none of that in your code. Of course it must be because you don't 'have to'.
Can you help me put these pieces together?
thanks
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
|