Recently, I want to change a component written in C # To VB.net. Since I was not very familiar with VB, I found that many corresponding writing methods should be checked and there is no comparison table, it was very troublesome to query. After consulting, I thought about it and asked if there was a table of the corresponding syntax between VB.net and C #. I thought about the following address:
Http://www.harding.edu/USER/fmccown/WWW/vbnet_csharp_comparison.html
VB. NET and C # comparison
Considering that the page is slow to open, I added it to my favorites at the same time.ArticleInside: connected:
Http://blog.joycode.com/ghj/posts/15091.aspx
Some C #CodeThe Conversion Tool with VB.net code can be viewed at the following address:
Http://authors.aspalliance.com/aldotnet/examples/translate.aspx
Http://www.kamalpatel.net/ConvertCSharp2VB.aspx
Http://www.ragingsmurf.com/vbcsharpconverter.aspx
Http://w1.311.telia.com /~ U31115556/DESC/programs.htm
Http://expert.csdn.net/Expert/topic/1645/1645967.xml
I tried these converters, I personally feel the first http://authors.aspalliance.com/aldotnet/examples/translate.aspx? These are the best of them.
In my experiment, I changed a paging component from the C # code to the VB.net code. The paging component can be viewed as follows:
Http://www.microsoft.com/china/msdn/archives/library/dnaspp/html/PagerControls.asp
C # After the code is converted to VB.net code, I can use it with a slight modification. I made the following changes:
1. in VB.net, classes and enumerations are not public by default. problems may occur during conversion.
2. The event-triggered code is different. For example, the following code:
C # Write as follows:
Protected virtual void onclick (eventargs E)
{
If (Click! = NULL)
{
Click (this, e );
}
}
VB.net is written as follows:
Protected overridable sub onclick (E as eventargs)
Raiseevent click (Me, E)
End sub
3. After conversion, the property information will be misplaced. If there is a comment, it will be put before the comment incorrectly.
If you need to convert the C # code to the VB code, we strongly recommend that you use this tool. The general code can be run after conversion, and the complex code can be modified slightly. It is strongly recommended.