How to convert a comma separated string to System.Int64 (array) ?
Can someone please help me with the syntax ?
How to convert a comma separated string to System.Int64 (array) ?
Can someone please help me with the syntax ?
Create a array of type Int64
in an assign activity do this:
arrayInt64_variable = yourStringVariable.Split(","c).Select(Function (x) Convert.ToInt64(x)).toArray
Expression:
yourStringVariable.Split(","c).Select(Function (x) Convert.ToInt64(x)).ToArray()
Try this:
inputString = "1,2,3,4,5"
int64Array = inputString.Split(","c).Select(Function(x) Convert.ToInt64(x)).ToArray()
DataType of int64Array is Array(System.Int64)
Hope it helps!!
int64Array = yourCommaSeparatedString.Split(","c).Select(Function(x) Convert.ToInt64(x.Trim)).ToArray()
in assign
comma_Separated_String consider As String = “6,5,8,9,6,2,4,5”
comma_Separated_String.Split(","c).Select(Function(x) Long.Parse(x)).ToArray()
cheers…!
@Ragavi_Rajasekar
Input:
Str={“1”,"2,“3”}
syntax:
str.split(","c).select(function(x) clng(x)).toarray
clng means convert int64