簡體   English   中英

使用Console.ReadLine()C#讀取地址

[英]Read address using Console.ReadLine() C#

我試圖使用以下方法讀取內存地址:

int address = Console.ReadLine();

如您所見,這行不通,我該怎么做?

讀取值:0x007FCB20

首先將其捕獲為字符串。 例如

string address = Console.ReadLine();

然后將字符串轉換為整數:

Int32 addressInt = Convert.ToInt32(address, 16);

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM