Switch-Toolbox/Switch_Toolbox_Library/IO/Extensions/UintExtension.cs
2019-07-17 19:01:06 -04:00

21 lines
427 B
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.IO;
namespace System
{
public static class UintExtension
{
public static uint SwapBytes(this uint value)
{
byte[] bytes = BitConverter.GetBytes(value);
Array.Reverse(bytes);
return BitConverter.ToUInt32(bytes, 0);
}
}
}