19 lines
415 B
C#
Raw Normal View History

2024-08-17 14:27:18 +08:00
using System;
namespace Plugins.JNGame.Util
{
public class ToUtil
{
public static int Byte4ToInt(byte[] data)
{
return BitConverter.ToInt32(data, 0);
}
public static byte[] IntToByte4(int value)
{
byte[] result = new byte[4];
BitConverter.GetBytes(value).CopyTo(result, 0);
return result;
}
}
}