Hi all,
i try to convert the branch item to a double or string depending whats inside.
For example this Item 6 i would like to convert to a double how does it work…i tried
var x = Test.Branch(0)[0];
Convert.ToDouble(x);
A = x.GetType();
But it says
and the input is
or ist System.Int32 a double ?
hi @flokart, Convert does not transform the variable supplied (it doesnt work “in place”), you have to assign the converted value to a new variable e.g.:
int myInt = 5;
var myHopefullyDouble = Convert.ToDouble(myInt);
You can read up on convert in the microsoft docs: https://docs.microsoft.com/en-us/dotnet/api/system.convert?view=netframework-4.7.2
cool that seems to works thanks.
var x = Test.Branch(0)[0];
double T = Convert.ToDouble(x);
A = T.GetType();