473,671 Members | 2,283 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 1124

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

Similar topics

1
4903
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 = 2.5784852e-009 Double = 17.192157 When i use php to read file by code:
29
16743
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
2645
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> vVector to it.. I'm using this line of code.. alValue->Add (new System::Double(vVector)) and I'm getting the following compilation error..
4
4125
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 - but I would like it to display nothing instead.. Is this possible?
1
3698
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 records = root.ChildNodes;
6
9221
by: Java1963 | last post by:
Need help with writting an application that prompt for and read a double value representing a monetary amount. -------------------------------------------------------------------------------- Hello all, I am new to this Java stuff and, I need help in writting an application will prompt for and read a double value representing a monetary amount.Then determine the fewest numbers of each bill and coin needed to represent that amount,...
4
1527
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 point. I know that its is possible by doing the following double d1 = 2.00; string strValue; strValue = d1.ToString("#,###.00") However the problem is that I do not know how many 0s there will be after the decimal point before hand. The number...
4
2367
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 location like, it is like .. 40 00 00 00 00 00 00 00
2
1753
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 = 0.0; double sunMass = 0.0; Random rdm = new Random(); double rand = rdm.nextDouble(); if (rand >= 0.5 && rand <= 0.7){
1
1919
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 Convert.ToBytes(Math.Sin(value)) and also Convert.ToSByte(Math.Sin(value)) but it shows an error of value is too large.. please help...i am stuck over here.
0
8392
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8912
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8597
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7428
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6222
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5692
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4222
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4403
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2809
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 we have to send another system

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.