Username      Register
Password      Forgotten Your Password?
Remember Me?  
Submit a New Story

How to show hexadecimal is Stringformat by using .NET | >> The Developer By IT-Devzone

BY:lingkung1107 525 days ago on Education      

บทความนี้เป็นการเขียนโปรแกรม เพื่อดึงค่าที่อยู่ในรูปแบบ Byte หรือ hexadecimal (hex) มาแสดงเป็นรูปแบบสตริง (String)
อย่างเช่น ตัวอย่างซอร์คโค้ดต่อไปนี้
byte[] array = new byte[5];
array[0] = 0?53;
array[1] = 0xA4;
array[2] = 0xB5;
array[3] = 0xC6;
array[4] = 0xFF;
ต้องการให้แสดงผลใน TextBox ปกติ ก็จะแสดง FF ก็จะแสดง “255? ,A4 ก็จะแสดง “164? แต่สิ่งที่เราต้องการ ก็คือ ค่า FF ก็ต้องแสดงผลใน Textbox “FF” ด้วยเช่นกัน จะเขียนโค้ดอย่างไร ง่ายนิดเดียวครับ ไปดูกันเลย


Log in to comment or register here.

Powered By: Pligg CMS   •   Design By: PliggThemes.com   •   Valid XHTML   •   Valid CSS

Diamond Mens Watches Studio Lighting Kit Store Ethernet Bridge Garage StorageSolution Store.com