转换"自己"从C#到VB.NET [英] Converting "myself" from C# to VB.NET

查看:96
本文介绍了转换"自己"从C#到VB.NET的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是一个C#程序员(爱好),但我想转换为VB.NET程序员。我所看过的写C#和VB.NET很多帖子,但我需要最先进的一些链接从基础知识讲解(如无效的主要无效)。



注:微软博客(到现在为止无论我读)指的不是基本的核心知识水平/事情


解决方案

除了从书本/博客,学习C#/ VB墙的另一边的好办法是写在C#中的一些代码,编译它,并打开反射器的DLL和视图VB代码。这将允许您回答有关VB.NET自己的问题。



例如,你想看看怎么做仿制药在VB.NET假设。你写在C#中一个简单的库:

 无效的someMethod()
{
名单< INT>名单=新名单,LT; INT>();
}



编译这一点,那么在反射器打开,它会告诉你:

 子的someMethod 
昏暗的名单列表(整数)=新名单(整数)
端子

或类似的东西...



如果你知道如何做到这一点在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.

解决方案

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.

这篇关于转换&QUOT;自己&QUOT;从C#到VB.NET的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆