Event Handler using C# and VB.net
#1
Posted 04 October 2011 - 02:02 PM
#2
Posted 04 October 2011 - 02:12 PM
#3
Posted 04 October 2011 - 02:22 PM
HiHi Stefan
You could make a class library in C# and use it in VB.NET like I do in the samples at http://netmftoolbox.codeplex.com/
In some samples (the keypad and rfid reader) I used events.
But that's the only (decent) way to combine both languages I think. If you're going to develop the full package, I don't see a good reason to combine two languages to be honest. It'll only be useful when it's depending on other libraries written in another language.
Does that help?
My .NETMF projects: .NETMF Toolbox / Gadgeteer Light / Some PCB designs
#4
Posted 04 October 2011 - 02:23 PM
#5
Posted 04 October 2011 - 02:30 PM
#6
Posted 04 October 2011 - 06:12 PM
From where did you get that? VB.net supports Sockets!VB.net don't have Sockets libs,
I use it for sending files to my FTP server using a simple Socket FTP client, and the SimpleWebserver also uses Sockets, of course.
I still don't see why you need to use both C# and VB.net. VB.net can also uses handles, events and sockets, so It seems like you are crossing the stream to find water.
#7
Posted 04 October 2011 - 07:04 PM
Sorry that I didn't express myself correctly!
vb.net supports sockets, but i was refering vb.net for Netduino.
I already tried to add System.Net.Sockets but I didn't have sucess!
If you have a webserver based in vb.net, can you send to me?
Thanks!
Ricardo
#8
Posted 05 October 2011 - 01:41 PM
vb.net supports sockets, but i was refering vb.net for Netduino.
I was too! VB.net and sockets work great together.
Heres a webserver sample using VB.net. I took the C# version and converted it to VB using this web service.
For System.Net.Sockets to work you actually have to import Microsoft.SPOT.Net. I know, it's confusing as hell but that's the way it is.
#9
Posted 06 October 2011 - 08:28 AM
#10
Posted 06 October 2011 - 08:42 AM
You're used to VB6 I suppose? Loved those days!!How can I use mid() function, instr() function? I already add System.Strings, but I can't access to these functions.
Try this:
Dim text As String = "This is a test string" Debug.Print(text.Substring(5, 2)) ' "is" Debug.Print(text.IndexOf("test").ToString()) ' 10
My .NETMF projects: .NETMF Toolbox / Gadgeteer Light / Some PCB designs
#11
Posted 06 October 2011 - 08:48 AM
#12
Posted 06 October 2011 - 10:27 AM
If you do this, I'd love to see the code.I've read in another post that I can decompile Microsoft.Visualbasic.dll, catch the functions that I need and add these functions to my Microsoft.VisualBasic.dll Microframework... I'll try this!
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users