Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想说 0x82000000 并添加说 1dcf 到它,所以它会变成 0x82001dcf 或任何地址。我将如何以最简单的方式做到这一点?在此先感谢您的帮助
使用不安全的代码:
public unsafe void Foo() { byte* start = (byte*)0x82000000; start += 0x1DCF; }
使用 IntPtr:
public void Foo() { IntPtr start = new IntPtr( 0x82000000 ); Int64 value = start.ToInt64(); value += 0x1DCF; IntPtr result = new IntPtr( value ); }