open-dis-csharp
open-dis-csharp copied to clipboard
Won't compile without error .NET8 - This call is ambiguous...
After cloning repo, upgrading to .NET8 release, and building the following error occurs in:
\open-dis-csharp\CsharpDis6\OpenDis\Enumerations\Entity.Information.Minefield\PaintScheme.cs line 275 public byte[] ToByteArray() => BitConverter.GetBytes(ToByte());
CS0121 The call is ambiguous between the following methods or properties: 'BitConverter.GetBytes(Half)' and 'BitConverter.GetBytes(short)'
This may have been introduced in .NET 7 per the post below: https://github.com/dotnet/runtime/issues/79034
Recommend changing line to the following to support .NET 8 and past versions public byte[] ToByteArray() => BitConverter.GetBytes((short)ToByte());