473,513 Members | 2,624 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Double value 0.0 classed as Nothing?

116 New Member
Hi.

I am retrieving JSON data. Not all parameters are returned each time and some that are returned might be a double value of 0.0.

The problem is, I thought that I could just check if the parameter was returned by using the following....

Expand|Select|Wrap|Line Numbers
  1. 'mydata is the parsed JSON response, value1 is a double value
  2. If Not mydata.value1 Is Nothing Then
  3. ' process
  4. Else
  5. 'ignore
  6. End If
  7.  
However if mydata.value1 = 0.0 it seems to treat this as Nothing and bypasses the processing.

I can't convert it to another format since as soon as I try to do that it will crash if mydata.value1 isn't part of the returned data.

Is there another way to determine if the parameter was returned in the response other than 'Nothing'?

Thanks

EDIT: At the moment I'm forcing the response value to be read as a string which seems to help but there has to be a proper way to do this since the true data is returned as a double
Mar 29 '15 #1
0 1117

Sign in to post your reply or Sign up for a free account.

Similar topics

1
4884
by: nooy66 | last post by:
I need to read value type double form my binary file. When i use Hex Workshop software read my binary file. i have data 8 bytes : hex = 3131 3131 3131 3140 string = 1111111@ Float =...
29
16689
by: Peter Ammon | last post by:
What's the most negative double value I can get? Is it always guaranteed to be -DBL_MAX? If so, why (or rather, where)? Thanks.
1
2635
by: San | last post by:
Hi, I'm using a Managed C++ project with MFC support. I have an ArrayList pointer object alValue (ArrayList* alValue) to this object i want to add all the elements present in Vector<double>...
4
4116
by: Maria | last post by:
I've tried to search for a way to set a datetimepicker.value to nothing. I would like it to display nothing until the user select a value.. I know you can use a checkbox to disable the control -...
1
3667
by: Martin Pöpping | last post by:
Hello, I´ve a problem with parsing a double value from an xml file. My code looks like this: int concept_id; double rank; XmlElement root = documentXMLString.DocumentElement; XmlNodeList...
6
9211
by: Java1963 | last post by:
Need help with writting an application that prompt for and read a double value representing a monetary amount. -------------------------------------------------------------------------------- ...
4
1513
by: Max80 | last post by:
Hi Everyone, I have a double value (e.g. 2.00) which I would like to convert to string. Simply returning the value using the .ToString() method trims the 0s after the decimal...
4
2353
by: ashishbhatt12 | last post by:
Hi all, i have a problem in the value which stored in memory location.i want to convert it into the double value. Suppose, i have the value int k = 2; when I write it on the memory...
2
1749
by: blazzer | last post by:
Hi, I need help. I just wondering whether i can set the double value using random class..i even use if statement to set it..but nothing..i wanna set between 0.5 n 0.7 value.. double planetMass...
1
1915
by: aamirsami | last post by:
hi, i am using Math.Sin(value). this function returns a signed double value. eg. double ans = Math.Sin(value); but i want the result as a sbyte like sbyte ans=Math.Sin(value); I have used...
0
7259
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7158
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7380
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7535
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7523
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
5085
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4745
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3221
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1592
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.