代码拉取完成,页面将自动刷新
using System;
using System.Collections.Generic;
using System.Text;
public class SupportClass
{
public static byte[] ToByteArray(sbyte[] sbyteArray)
{
byte[] array = null;
if (sbyteArray != null)
{
array = new byte[sbyteArray.Length];
for (int i = 0; i < sbyteArray.Length; i++)
{
array[i] = (byte)sbyteArray[i];
}
}
return array;
}
public static byte[] ToByteArray(string sourceString)
{
return Encoding.get_UTF8().GetBytes(sourceString);
}
public static byte[] ToByteArray(object[] tempObjectArray)
{
byte[] array = null;
if (tempObjectArray != null)
{
array = new byte[tempObjectArray.Length];
for (int i = 0; i < tempObjectArray.Length; i++)
{
array[i] = (byte)tempObjectArray[i];
}
}
return array;
}
public static int URShift(int number, int bits)
{
int result;
if (number >= 0)
{
result = number >> bits;
}
else
{
result = (number >> bits) + (2 << ~bits);
}
return result;
}
public static int URShift(int number, long bits)
{
return SupportClass.URShift(number, (int)bits);
}
public static long URShift(long number, int bits)
{
long result;
if (number >= 0L)
{
result = number >> bits;
}
else
{
result = (number >> bits) + (2L << ~bits);
}
return result;
}
public static long URShift(long number, long bits)
{
return SupportClass.URShift(number, (int)bits);
}
public static long Identity(long literal)
{
return literal;
}
public static ulong Identity(ulong literal)
{
return literal;
}
public static float Identity(float literal)
{
return literal;
}
public static double Identity(double literal)
{
return literal;
}
public static void GetCharsFromString(string sourceString, int sourceStart, int sourceEnd, char[] destinationArray, int destinationStart)
{
int i = sourceStart;
int num = destinationStart;
while (i < sourceEnd)
{
destinationArray[num] = sourceString.get_Chars(i);
i++;
num++;
}
}
public static void SetCapacity(List<object> vector, int newCapacity)
{
if (newCapacity > vector.get_Count())
{
vector.AddRange(new List<object>(newCapacity - vector.get_Count()));
}
else
{
if (newCapacity < vector.get_Count())
{
vector.RemoveRange(newCapacity, vector.get_Count() - newCapacity);
}
}
vector.set_Capacity(newCapacity);
}
public static sbyte[] ToSByteArray(byte[] byteArray)
{
sbyte[] array = null;
if (byteArray != null)
{
array = new sbyte[byteArray.Length];
for (int i = 0; i < byteArray.Length; i++)
{
array[i] = (sbyte)byteArray[i];
}
}
return array;
}
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。