【C#学习笔记】类型转换

2021-09-10 18:12

阅读:846

标签:console   style   log   oid   ram   color   sys   space   学习    using System; namespace ConsoleApplication { class Program { static void Main(string[] args) { string a = "1234"; int b = Convert.ToInt32(a)+1; Console.Write(b+"\n"); a = Convert.ToString(b); Console.Write(a+"\n"); double s = 123.455; string l = Convert.ToString(s); Console.Write(l+"\n"); s = Convert.ToDouble(l)+1; Console.Write(s); Console.Read(); } } }  【C#学习笔记】类型转换标签:console   style   log   oid   ram   color   sys   space   学习   原文地址:http://www.cnblogs.com/tiandsp/p/7440425.html


评论


亲,登录后才可以留言!