Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
String to Byte[] Conversion
//Rextester.Program.Main is the entry point for your code. Don't change it. //Compiler version 4.0.30319.17929 for Microsoft (R) .NET Framework 4.5 using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; namespace Rextester { public class Program { public static void Main(string[] args) { byte[] bytes = null; int s= 43494; string datam="78780E80080000AA1D6C6273230001DC210D0A"; string _serverflag = s.ToString("X8"); Console.WriteLine(_serverflag); int NumberChars = datam.Length; bytes = new byte[NumberChars / 2]; for (int i = 0; i < NumberChars; i += 2){ bytes[i / 2] = Convert.ToByte(datam.Substring(i, 2), 16); Console.WriteLine(i/2+"="+bytes[i / 2]); } } } }
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
Execution flow of static and normal constructor of base and derived class.
ConcurrentQueue<T>
7
DN2
new
C# - MD5Hash
constructor execution sequence
String to Decimal CSHARP
Sum Matrix Main Diagonal
custom Generic stack Implementation
Please log in to post a comment.