[mono-vb] typeof (C#) / GetType (VB) conversion issue
Klaus Siebke
ksiebke at web.de
Tue Feb 24 11:56:03 EST 2009
Klaus Siebke wrote:
>
> Hi,
>
> I'm just trying to use a Gtk Treeview in my mono VB application.
> As a basis I used the mono Treeview tutorial:
> http://www.mono-project.com/GtkSharp_TreeView_Tutorial
>
> Now my problem ...
>
> Converting this C# code:
> // Create a model that will hold two strings - Artist Name and Song Title
> Gtk.ListStore musicListStore = new Gtk.ListStore (typeof (string), typeof
> (string))
>
> to VB this code:
> dim musicListStore as Gtk.ListStore = new
> Gtk.ListStore(GetType(string),GetType(string))
>
> gives me a compile error:
>
> [Task:File=/share/source/mono/vbnet/vbgladetest/vbgladetest/winMacAcc.vb ,
> Line=197, Column=1, Type=Error, Priority=Normal, Description=Delegate
> problems 3, /share/source/mono/vbnet/vbgladetest/vbgladetest/winMacAcc.vb
> (197,1)>/share/source/mono/vbnet/vbgladetest/vbgladetest/winMacAcc.vb
> (196,44)(VBNC99999)]
>
> Any ideas how to avoid this error?
> Does anybody have a working Gtk Treeview example in mono VB?
>
> Thanks,
> Klaus
>
>
Many thanks to Rolf Bjarne Kvinge, here's the solution:
'Create a model that will hold two strings
dim musicListStore as Gtk.ListStore = new Gtk.ListStore (new Type ()
{GetType (string), GetType (string)})
Everything works perfect now !
--
View this message in context: http://www.nabble.com/typeof-%28C-%29---GetType-%28VB%29-conversion-issue-tp22160704p22184617.html
Sent from the Mono - VB mailing list archive at Nabble.com.
More information about the Mono-vb
mailing list