【发布时间】:2017-03-26 11:29:53
【问题描述】:
我的 C# 应用程序中有这段代码:
JObject personJson = JObject.FromObject(
new
{
name = "John Doe",
age = 34,
height = 1.78,
weight = 79.34
});
Console.WriteLine(person);
它会记录:
{
"name": "John Doe",
"age": 34,
"height": 1.78,
"weight": 79.34
}
Dotfuscator 将其混淆为:
Console.WriteLine((object) JObject.FromObject((object) new global::b<string, int, double, double>("John Doe", 34, 1.78, 79.34)));
然后输出是这样的:
{}
如何在 Dotfuscator 中使用匿名类而不出现此问题?
编辑:
完整代码:
public static class Example
{
static void LogPerson()
{
JObject personJson = JObject.FromObject(
new
{
name = "John Doe",
age = 34,
height = 1.78,
weight = 79.34
});
Console.WriteLine(JSONObject);
}
}
【问题讨论】:
标签: c# obfuscation dotfuscator