question

Upvotes
Accepted
1 0 0 2

databuffer price double vs float vs using real no examples in c#

I'm getting totally different values in double and float fields in the databuffer

Type 8 /Real

Double: 3.6758187362220366E+228

Float: 4.28846683E-08

What I'm missing here?



treprfarfa-apic#.net
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvote
Accepted
78.1k 246 52 72

@ilija.mitkov

According to the double output, the data is too big for the float data type. You can refer to the C# data types for more information.

I am not sure if 3.6758187362220366E+228 is the correct data, or not.

Has the application checked IsBlank before accessing the data? If the data is blank and the application tries to decode the data, it may return invalid data.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
1 0 0 2

Thanks, it seems checking IsBlank helped

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.