Click here to Skip to main content
15,894,337 members
Home / Discussions / C#
   

C#

 
GeneralRe: The title of a control Pin
Dave Kreskowiak4-May-09 17:28
mveDave Kreskowiak4-May-09 17:28 
GeneralRe: The title of a control Pin
Dan Neely4-May-09 10:10
Dan Neely4-May-09 10:10 
AnswerRe: The title of a control Pin
Dave Kreskowiak4-May-09 17:30
mveDave Kreskowiak4-May-09 17:30 
QuestionI have a float in a binary file ( 0x00, 0x00, 0x06, 0x8B ) (1675), on a Windows Machine, How do I read it in from a binary file in c#? Pin
Greg Mort4-May-09 7:25
Greg Mort4-May-09 7:25 
AnswerRe: I have a float in a binary file ( 0x00, 0x00, 0x06, 0x8B ) (1675), on a Windows Machine, How do I read it in from a binary file in c#? Pin
Luc Pattyn4-May-09 7:36
sitebuilderLuc Pattyn4-May-09 7:36 
AnswerRe: I have a float in a binary file ( 0x00, 0x00, 0x06, 0x8B ) (1675), on a Windows Machine, How do I read it in from a binary file in c#? Pin
Luc Pattyn4-May-09 8:35
sitebuilderLuc Pattyn4-May-09 8:35 
AnswerRe: I have a float in a binary file ( 0x00, 0x00, 0x06, 0x8B ) (1675), on a Windows Machine, How do I read it in from a binary file in c#? Pin
Greg Mort4-May-09 8:36
Greg Mort4-May-09 8:36 
AnswerRe: I have a float in a binary file ( 0x00, 0x00, 0x06, 0x8B ) (1675), on a Windows Machine, How do I read it in from a binary file in c#? Pin
JossGP4-May-09 8:37
JossGP4-May-09 8:37 
Hi Greg,

I think you could use this code ( for little endian) :

int result = 0;
int limit  = 4;
static float GetFloat(byte[] ToArray, int startindex)
{
    for (int i=0; i <limit; i++) 
    {
	byte thebyte = ToArray[startindex +limit-i-1];
	result = result << 8;
	result = result | thebyte;
    }
    return result;
}

I didn't manage binaries numbers wrote using big endian over little endian , but i think they are opposite in writing mode.

Try this, If it doesn't work change [startindex +limit-i-1] to [startindex +i]
hope this help you.
AnswerRe: I have a float in a binary file ( 0x00, 0x00, 0x06, 0x8B ) (1675), on a Windows Machine, How do I read it in from a binary file in c#? Pin
dybs4-May-09 15:40
dybs4-May-09 15:40 
Questionprint page with colored text in monochrome printer Pin
JossGP4-May-09 7:18
JossGP4-May-09 7:18 
AnswerRe: print page with colored text in monochrome printer Pin
Henry Minute4-May-09 8:59
Henry Minute4-May-09 8:59 
GeneralRe: print page with colored text in monochrome printer Pin
JossGP4-May-09 9:29
JossGP4-May-09 9:29 
GeneralRe: print page with colored text in monochrome printer Pin
Henry Minute4-May-09 10:00
Henry Minute4-May-09 10:00 
GeneralRe: print page with colored text in monochrome printer Pin
JossGP4-May-09 10:16
JossGP4-May-09 10:16 
QuestionProblem rotating AND centring text on a bitmap Pin
Peter Trevor4-May-09 7:05
Peter Trevor4-May-09 7:05 
AnswerRe: Problem rotating AND centring text on a bitmap Pin
Luc Pattyn4-May-09 7:47
sitebuilderLuc Pattyn4-May-09 7:47 
GeneralRe: Problem rotating AND centring text on a bitmap Pin
Peter Trevor4-May-09 10:11
Peter Trevor4-May-09 10:11 
GeneralRe: Problem rotating AND centring text on a bitmap Pin
Luc Pattyn4-May-09 10:19
sitebuilderLuc Pattyn4-May-09 10:19 
QuestionPowerPoint-Automation, Navigate through slides by c# Pin
heikogerdd4-May-09 6:41
heikogerdd4-May-09 6:41 
QuestionAccess denied Pin
jon-804-May-09 5:40
professionaljon-804-May-09 5:40 
AnswerRe: Access denied Pin
I am BATMAN4-May-09 6:10
I am BATMAN4-May-09 6:10 
AnswerRe: Access denied Pin
Tony Richards4-May-09 7:01
Tony Richards4-May-09 7:01 
JokeRe: Access denied Pin
Dave Kreskowiak4-May-09 17:24
mveDave Kreskowiak4-May-09 17:24 
GeneralRe: Access denied Pin
jon-804-May-09 19:20
professionaljon-804-May-09 19:20 
GeneralRe: Access denied Pin
Dave Kreskowiak5-May-09 3:51
mveDave Kreskowiak5-May-09 3:51 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.