如何将这段C ++代码转换为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)