I have an array of three bytes, I want to convert the array to double using C #. Please help me.
Well double is an array of 8 bytes, so with 3 bytes you will not have all the possible values.
To do what you want:
var myBytes[] = {0,0,0,0,0,1,1,2}; //assume you pad your array with enough zeros to make it 8 bytes. var myDouble = BitConverter.ToDouble(myBytes,0);
Well, it depends on what you want to do.
8 ( ) double BitConverter.ToDouble, , - , double 64 , . ? , ? , .
double
BitConverter.ToDouble
Depends on what exactly is stored in bytes, but you can just put an array with 5 bytes containing 0, and then use BitConverter. ToDouble .
Source: https://habr.com/ru/post/1758337/More articles:Is this Java design idea practical? (Flow Scheduler and Particle Particle Optimization) - javaWPF DataTrigger for any data changes (bindings) - wpfЧто я должен делать * в AnkhSVN, когда два человека редактируют один и тот же файл под SVN - svnQA Testing Tips Black Box - testinghttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1758336/what-are-the-ways-to-do-numeric-testing-in-bash&usg=ALkJrhgPUGiPeL0rDYHJuJhfzyjQBSOSCQHow to read the contents of a specific page from a PDF using the itextsharp API - pdfHow to simulate an "open link in a new window" in C # WebBrowser? - c #Column not found: 1054 Unknown column 'category_ids' in 'list of fields' - phpDestroy Android application - androidmac os x The component equivalent of an object model - operating-systemAll Articles