ASP.NET simple format conversion method

怪我咯
Release: 2017-03-30 13:25:17
Original
1495 people have browsed it

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); Convert 65 of the SCII code table into characters;

The result is A

1. char_a; char_a=”hello world”.ToCharArray();Convert string to character typearray

2. Automatic type conversion; int age=10; Response.Write("I am this year"+age+"year"); integer or other types, added together with string type, automatically converted to string type; or another way of writing: 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 the text in the text box to double type;


The above is the detailed content of ASP.NET simple format conversion method. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template