Asp. NET Simple format conversion method

Source: Internet
Author: User

1.int str_a= "33"

int i_a=convert.toint16 (str_a); Convert to short integer (16)

2.charchar_a;

Char_a=convert.tochar (65);

Response.Write (char_a); Turn 65 of the SCII code table into characters;

The result is a

1. char_a; Char_a= "Hello World". ToCharArray (); Converting a string to a character array

2. automatic conversion type; int age=10; Response.Write ("I am +age+" this year); integer or other type, together with the string type, automatically to the string type, or another way: Response.Write ("This year I" +age.tostring () + "years old");

3. Numb_fen=double.parse (Textbox_1.text);

Lable_1.text=numb_fen;

Lable.forcecolor=system.drawing.color.green; the label foreground color is green;

Convert text box to double type;

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.