Updated to C# 12
This commit is contained in:
17
AMWD.Common.MessagePack/Utilities/NetworkHelper.cs
Normal file
17
AMWD.Common.MessagePack/Utilities/NetworkHelper.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using System;
|
||||
|
||||
namespace AMWD.Common.MessagePack.Utilities
|
||||
{
|
||||
/// <summary>
|
||||
/// Provides some network utils.
|
||||
/// </summary>
|
||||
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
|
||||
internal static class NetworkHelper
|
||||
{
|
||||
public static void SwapBigEndian(byte[] array)
|
||||
{
|
||||
if (BitConverter.IsLittleEndian)
|
||||
Array.Reverse(array);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user