Exetools  

Go Back   Exetools > General > General Discussion

Notices

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 06-08-2020, 18:24
jonwil jonwil is offline
VIP
 
Join Date: Feb 2004
Posts: 399
Rept. Given: 2
Rept. Rcvd 21 Times in 9 Posts
Thanks Given: 2
Thanks Rcvd at 67 Times in 35 Posts
jonwil Reputation: 21
Tips for fixing up decompiled .NET code?

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?
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Import OS Fixing MaRKuS-DJM General Discussion 31 07-16-2004 23:20
Fixing an EXE to not call a DLL? Barry General Discussion 11 06-03-2004 00:37


All times are GMT +8. The time now is 21:51.


Always Your Best Friend: Aaron, JMI, ahmadmansoor, ZeNiX, chessgod101
( Since 1998 )