Last post Apr 22, 2014 02:49 AM by Angie xu - MSFT
Apr 17, 2014 09:53 PM|steve03602|LINK
I am in the process of converting UChat from C# to VB in VWD2010. I ran into an error I can not figure out on the Global.asax file....
here is the section of code
<%@ Application Language="VB" %>
<%@ Import Namespace="ASPNETChat" %>
<%@ Import Namespace="System.Threading " %>
Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs)
' Code that runs on application startup
System.Threading.Timer (ChatRoomsCleanerTimer = New System.Threading.Timer(New TimerCallback(ChatEngine.CleanChatRooms), null, 1200000, 1200000))
the errors I am getting are:
1) 'Timer' is a type in 'threading' and cannot be used as an expression
2) ChatRoomsCleanerTimer is not declared. It may be inaccessible due to its protection level ...... maybe declare this up top?
3) delegate system.threading.timer callback requires an addessOf expression or lambda expression as the only argument to its constructor
4) Nill constant is no longer supported; use system.DBNull instead........I change this one and then I get the cannot be used as an expression error
Or maybe someone has an example of a chat program in VB they could point me to.... I have searched all over with no luck only ones I find are in C
Apr 22, 2014 02:49 AM|Angie xu - MSFT|LINK
Welcome to asp.net forum.
System.Threading.Timer (ChatRoomsCleanerTimer = New System.Threading.Timer(New TimerCallback(ChatEngine.CleanChatRooms), null, 1200000
For VB.Net related questions, I think you could consider getting help from
Visual Basic forum, VB experts can help you.
Thanks for your understanding.