C # conversion between data types of operation skills

Source: Internet
Author: User
The conversion between data types in VB is a very easy function, such as CSTR and CINT. We should all have
It is very clear, now you can use C # For Web applications! Now we have another language option. In addition, there are indeed many
Vbprogramming has a lot of incomprehension: (, so they would rather use C # for programming, and there are also a lot of comrades who are not firm! Also want to learn C #
Language (for example, bean curd ..), In this way, the data conversion problem suddenly exists! In addition, the string data type is converted.
First, let's look at the conversion between int and string.
INT-> string, use the tostring function. Let's take a look at this example. 1. tostring (), God, such a syntax can all be identified :)
This is the C # language.
String-> int has a lot of options (actually one), such as: "12345". toint16 (), function, and of course toint32, toint64, etc.
The usage of similar functions is the same

How to convert string to array type according to specified rules, "http://www.asp888.net tofu technology station". Split ("". tochararay ())

how to convert a specified string to another string in a string, for example: convert "'" to "'' "
here we need to introduce a new class stringbuilder, let's take a look at this function
then, we can use replacestr1tostr2 (STR, "'", "'' ") to process the"' "symbol when processing SQL statements! In addition,
You can also press enter to process output data through replacestr1tostr2 (STR, "N", "
!!!

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.