您的位置:首页 > 其它

字符串转化为整型1

2012-02-23 14:52 323 查看
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApplication1
{
class Program
{
/**
* 字符串转化为整型1
*/
static void Main(string[] args)
{
try
{
string str = "1d3";
int strInt = Convert.ToInt32(str);
Console.WriteLine(strInt);
}
catch(Exception e)
{
Console.WriteLine(e.Message + "\n" + e.StackTrace);
}

Console.ReadKey();
}
}
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: