Quantcast
Channel: Tweetinvi a friendly Twitter C# library
Viewing all articles
Browse latest Browse all 4126

New Post: convert samplestream to vb.net

$
0
0
Hello,

I am trying to get the stream reader going, and noticed your thread example below which is perfect, I am wondering if someone might be able to help me convert it or an equilivent to vb.net:
  Dim t = New Thread(Function()
                               Dim sampleStream = Stream.CreateSampleStream()
                               sampleStream.TweetReceived += Function(s, a) Console.WriteLine(a.Tweet.Text)
                               sampleStream.StreamStarted += Function(s, a) Console.WriteLine("Stream started!")
                               sampleStream.StartStream()
                           End Function)

        t.Start()
I have done a few of these before, and would change it to

Addhandler samplestream.tweetrecieved, addressof tweetrecieved

then the sub, I am just not sure what the passed parameters and so on should be and how i pass those in this as they don't convert using the C3 to vb converter.

Many thanks!

Viewing all articles
Browse latest Browse all 4126

Trending Articles