private static string Convert1(int value)
{
int temp = 0;
int shang = 1;
int yushu;
while (shang != 0)
{
shang = value / 2;
yushu = value % 2;
value = shang;
temp += yushu;
if (shang != 0)
{
temp = temp * 10;
}
}
//最后将 temp 倒序
string tempStr = temp.ToString();
int tempLength = tempStr.Length;
string resultStr = string.Empty;
for (int i = 0; i < tempLength; i++)
{
resultStr = tempStr[i] + resultStr;
}
return resultStr;
}