gpt4 book ai didi

c# - 使用 Console.ReadLine() C# 读取地址

转载 作者:太空宇宙 更新时间:2023-11-03 15:43:52 24 4
gpt4 key购买 nike

我尝试使用以下方法读取内存地址:

int address = Console.ReadLine();

如您所见,这行不通,我该怎么做呢?

要读取的值:0x007FCB20

最佳答案

首先将其捕获为字符串。例如

string address = Console.ReadLine();

然后将字符串转换为整数:

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

关于c# - 使用 Console.ReadLine() C# 读取地址,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29089116/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com