Solved

C# to vb.net

Posted on 2012-03-23
5
574 Views
Last Modified: 2012-04-02
Could somebody translate this to vb.net..

 Action action1 = () =>  this.BeginStoryboard((Storyboard)this.FindResource("BlinkStoryboardFedListBox"));
                Dispatcher.BeginInvoke(action1);
                Action action = () => CustomPaging((int)PagingMode.Next);
                Dispatcher.BeginInvoke(action);
                _timernextitem.Start();


 Action action1 = () => this.BeginStoryboard((Storyboard)this.FindResource("BlinkStoryboardSecondImageFed"));
            Dispatcher.BeginInvoke(action1);
            Action action = () => BindToSecondImages(lstimgpath);
            Dispatcher.BeginInvoke(action);
            _timerforsecimg.Start();
0
Comment
Question by:jamppi
5 Comments
 
LVL 29

Expert Comment

by:Paul Jackson
Comment Utility
Dim action1 As Action = Function() Me.BeginStoryboard(DirectCast(Me.FindResource("BlinkStoryboardFedListBox"), Storyboard))
Dispatcher.BeginInvoke(action1)
Dim action As Action = Function() CustomPaging(CInt(PagingMode.[Next]))
Dispatcher.BeginInvoke(action)
_timernextitem.Start()


Dim action1 As Action = Function() Me.BeginStoryboard(DirectCast(Me.FindResource("BlinkStoryboardSecondImageFed"), Storyboard))
Dispatcher.BeginInvoke(action1)
Dim action As Action = Function() BindToSecondImages(lstimgpath)
Dispatcher.BeginInvoke(action)
_timerforsecimg.Start()

Open in new window


http://www.developerfusion.com/tools/convert/csharp-to-vb/
0
 
LVL 28

Expert Comment

by:sammySeltzer
Comment Utility
Dim action1 As Action = Function() Me.BeginStoryboard(DirectCast(Me.FindResource("BlinkStoryboardFedListBox"), Storyboard))
Dispatcher.BeginInvoke(action1)
Dim action As Action = Function() CustomPaging(CInt(PagingMode.[Next]))
Dispatcher.BeginInvoke(action)
_timernextitem.Start()


Dim action1 As Action = Function() Me.BeginStoryboard(DirectCast(Me.FindResource("BlinkStoryboardSecondImageFed"), Storyboard))
Dispatcher.BeginInvoke(action1)
Dim action As Action = Function() BindToSecondImages(lstimgpath)
Dispatcher.BeginInvoke(action)
_timerforsecimg.Start()

Open in new window


http://converter.telerik.com/
0
 

Author Comment

by:jamppi
Comment Utility
tried that but i get,   'Expression does not produce a Value'
0
 
LVL 28

Expert Comment

by:sammySeltzer
Comment Utility
I *think* but not sure you can do each of them like this:

Public Function() 
Dim action As Action  
BindToSecondImages(lstimgpath)
Dispatcher.BeginInvoke(action)
_timerforsecimg.Start()

Return action 
End Function

Open in new window

0
 
LVL 74

Accepted Solution

by:
käµfm³d   👽 earned 250 total points
Comment Utility
Use the keyword Sub instead of Function in the above solutions. Action corresponds to a function with a void return. The VB equivalent of a function that returns void is a Sub.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now