I have decompiled a .NET binary with dnSpy and the resulting output has some strange things in it like this
Code:
public HouseType(sbyte id, string name, string unitTeamColor, string buildingTeamColor, [TupleElementNames(new string[]
{
"type",
"teamColor"
})] params ValueTuple<string, string>[] overrideTeamColors)
{
this.ID = id;
this.Name = name;
this.UnitTeamColor = unitTeamColor;
this.BuildingTeamColor = buildingTeamColor;
this.OverrideTeamColors = overrideTeamColors.ToDictionary(([TupleElementNames(new string[]
{
"type",
"teamColor"
})] ValueTuple<string, string> x) => x.Item1, ([TupleElementNames(new string[]
{
"type",
"teamColor"
})] ValueTuple<string, string> x) => x.Item2);
}
and this
Code:
for (int i = 0; i < array2.Length; i++)
{
var <>f__AnonymousType = array2[i];
this.plugin.Map.Triggers.Add(<>f__AnonymousType.NewTrigger.Clone());
this.plugin.Map.Triggers.Remove(<>f__AnonymousType.OldTrigger);
}
and this
Code:
[CompilerGenerated]
internal static string <LoadINI>g__indexToType|20_1(IList<string> list, string index)
{
int num;
if (!int.TryParse(index, out num) || num < 0 || num >= list.Count)
{
return list.First<string>();
}
return list[num];
}
Are there any good tutorials on how to fix up such things?