Overload resolution failed because no accessible 'ToDouble' is most specific for these argument

Hi,

I have a variable ‘NTData’ which has a value 1.4GB.
I did a string conversion NTData.Split("G"c)(0) and assigned it to NTDataInt

Then i want to multiply by 1000 so i created another variable and assigned
NTDataIntCal=Convert.ToDouble(NTDataInt)*1000

Doing above as i want to do the above multiplication.

When i did this i get the above compiler error.

I did the very same thing to another variable in the same workflow and it came out fine.

Any idea why the above happens and how to correct. All variables are ‘Generic Value’ type

1 Like

Hi
You were almost done
Kindly try like this
NTData = “1.4GB”
Then use a assign activity with string variable

Str_NTDataInt = Split(NTData.ToString,”G”)(0).ToString

Then finally a assign activity like this

Str_Output = (Convert.ToDouble(Str_NTDataInt.ToString)*1000).ToString

Where the double value is now stored in a string variable

Or if we want that to be in a double variable then
In variable create a variable of type System.Double and assign it like this

dou_NTTData = Convert.ToDouble(Str_NTDataInt.ToString)*1000

Cheers @tharinda

2 Likes

@Palaniyappan
I typed almost the same thing and after seeing your one I just removed everything I typed haha :rofl::rofl:

3 Likes

Thanks, worked out, chose to retain as String. Also tried the other solution for practice that worked too.

Thanks again

2 Likes

Cheers @tharinda

1 Like

Thanks Lahiru for the effort. Both worked, chose to stick with retaining as string

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.