[英]Read address using Console.ReadLine() C#
我試圖使用以下方法讀取內存地址:
int address = Console.ReadLine();
如您所見,這行不通,我該怎么做?
讀取值:0x007FCB20
首先將其捕獲為字符串。 例如
string address = Console.ReadLine();
然后將字符串轉換為整數:
Int32 addressInt = Convert.ToInt32(address, 16);
他回答了我的問題: https : //stackoverflow.com/users/2864740/user2864740
解決方案: 如何從字符串設置int十六進制文字,
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.