// If the system architecture is little-endian (that is, little end first), // reverse the byte array. if (BitConverter.IsLittleEndian) Array.Reverse(bytes);
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) { // Windows 相关逻辑 } else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) { // Linux 相关逻辑 }