我想将写入字符串中的二进制数转换为其整数值.
I would like to convert a binary number writen in a String into its integer value.
例如:
string input = "0101";
int output = convert(input);
output 应该等于 5
转换.ToInt32(String, Int32) 让您指定基数:
int output = Convert.ToInt32(input, 2);
这篇关于将二进制字符串转换为整数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!
车牌检测有哪些好的算法?What are good algorithms for vehicle license plate detection?(车牌检测有哪些好的算法?)
Unity中图像的onClick事件onClick event for Image in Unity(Unity中图像的onClick事件)
运行总 C#Running Total C#(运行总 C#)
单击带有 JAvascript.ASP.NET C# 的超链接时删除目录Deleting a directory when clicked on a hyperlink with JAvascript.ASP.NET C#(单击带有 JAvascript.ASP.NET C# 的超链接时删除目录)
asp.net listview 在单击时突出显示行asp.net listview highlight row on click(asp.net listview 在单击时突出显示行)
从函数调用按钮 OnClickCalling A Button OnClick from a function(从函数调用按钮 OnClick)