Using Web services to convert C # code to vb.net code

Source: Internet
Author: User
Tags web services
Web|web Services | The Internet is rapidly evolving, and future Web sites are not as monotonous as they are today, but can be directly connected to businesses, applications, or devices. Such sites also get rid of simple passive access and become reusable smart services.

This article explains how to use the Web services provided by Www.kamalpatel.net to support code that converts C # code into vb.net format. Because the content described in this article uses Web services, you need to add a Web service reference first. In IE, enter the following address "Http://www.kamalpatel.net/convertcsharp2vbservice.asmx" opens a page where you can see that the Web Service has only one common method, that is, "Execute" , its argument is C # code, and the return value is vb.net code.

Please download the routines, in fact, the most important is the following lines of code:

Class
Net.kamalpatel.www.ConvertCSharp2VBService Oservice;
Oservice = new Net.kamalpatel.www.ConvertCSharp2VBService ();
Call the Execute method to handle the format
String lcstr = Oservice.execute (This.txtCsharp.Text);
This.txtVbnet.Text = Lcstr.replace ("\ n", "\ r \ n");

The caveat here is that because the XML annotation feature is only available in the C # language, the converter will replace it with single quotes.

Click Download Routines




Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.