private void ConvertByteArrayToStr(ref byte[] byteArray, UInt32 byteArrayLength, ref string binaryStr)
{
for (int i = 0; i < byteArrayLength; i++)
{
binaryStr = binaryStr + Convert.ToString(byteArray[i], 2).PadLeft(8, '0');
}
}
private void ConvertByteArrayToBinaryInt64(ref byte[] byteArray, UInt32 byteArrayLength, ref Int64 binaryCode)
{
string binaryStr = "";
for (int i = 0; i < byteArrayLength; i++)
{
binaryStr = binaryStr + Convert.ToString(byteArray[i], 2).PadLeft(8, '0');
}
binaryCode = Convert.ToInt64(binaryStr, 2);
}
'프로그래밍' 카테고리의 다른 글
[CSS] how to change Button Style (0) | 2017.12.21 |
---|---|
[WPF] DataGrid (0) | 2017.12.18 |
[WPF] DataGrid에 ComboBox 추가하기 ( DataGridComboBoxColumn ) (0) | 2017.12.18 |
[jmeter] 사용법 (0) | 2017.10.25 |
[Node.js] PDF에 Watermark 찍기 (0) | 2017.09.19 |