Snippets

Winni Neessen 7Kak6: Untitled snippet

Created by Winni Neessen

File snippet.cs Added

  • Ignore whitespace
  • Hide word diff
+string str = "1234";
+char[] charValues = str.ToCharArray();
+string hexOutput="";
+foreach (char _eachChar in charValues )
+{
+    // Get the integral value of the character.
+    int value = Convert.ToInt32(_eachChar);
+    // Convert the decimal value to a hexadecimal value in string form.
+    hexOutput += String.Format("{0:X}", value);
+    // to make output as your eg 
+    //  hexOutput +=" "+ String.Format("{0:X}", value);
+
+}
HTTPS SSH

You can clone a snippet to your computer for local editing. Learn more.