Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Converting "myself" from C# to VB.NET

Tags:

c#

vb.net

I am a C# programmer (hobby), but I want to convert to a VB.NET programmer. I have seen many posts written in both C# and VB.NET, but I need some links which explain from the basics (like void main void) to the most advanced.

Note: Microsoft blogs (until now whatever I read) do not refer to the basic core level knowledge/things.

like image 787
user287745 Avatar asked Nov 30 '22 09:11

user287745


1 Answers

Aside from books/blogs, a good way to learn the other side of the C#/VB wall is to write some code in C#, compile it, and open the DLL in Reflector and view as VB code. This will allow you to answer your own questions about VB.NET.

For example, suppose you want to see how to do generics in VB.NET. You write a simple library in C#:

void SomeMethod()
{
    List<int> list = new List<int>();
}

Compile this, then open in Reflector, and it will show you:

Sub SomeMethod
    Dim list as List(Of Integer) = New List(Of Integer)
End Sub

or something like that...

If you know how to do it in C#, you can probably teach yourself how to do it in VB.NET this way easier than looking for samples online.

like image 56
Joe Enos Avatar answered Dec 13 '22 19:12

Joe Enos