Solved

C# to vb.net

Posted on 2012-03-23
5
617 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 29

Expert Comment

by:Paul Jackson
ID: 37758117
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 29

Expert Comment

by:sammySeltzer
ID: 37758118
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
ID: 37758175
tried that but i get,   'Expression does not produce a Value'
0
 
LVL 29

Expert Comment

by:sammySeltzer
ID: 37758385
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 75

Accepted Solution

by:
käµfm³d   👽 earned 250 total points
ID: 37758521
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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
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…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

726 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