如何将这段C ++代码转换为C# [英] How do I convert this piece of C++ code to C#
本文介绍了如何将这段C ++代码转换为C#的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要在我的C#程序中使用这段代码。我怎么转换它?
I need to use this piece of code in my C# program. How would I convert it?
#define brlsa(x) (x - 0x400000 + rBase)
我不知道如何转换它: /
我尝试过:
使用MemLib编辑它。我也试过寻找在线转换器。
I don't know how to convert it :/
What I have tried:
Editing it with MemLib. Also I've tried looking for online converters.
推荐答案
怎么样
What about
public static uint brlsa(uint x, uint rBase)
{
return (x - 0x400000 + rBase);
}
看起来你在图像标题(PE)等中徘徊 - 有一些c#库到处都是如果是这样,请帮助您更轻松(让谷歌成为您的朋友)
looks like you're poking around in image headers (PE) etc - there are some c# libraries around to help you make it easier if so (let google be your friend)
这篇关于如何将这段C ++代码转换为C#的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文