How to convert String with Space to integer

Hi,
i want to convert string to integer my input is as below
“25 26 27”
i need output as 25,26,27 in integer format
im able to replace with Comma, but when i convert it to integer im getting as 252627
could you please help me with this

an integer is a number without decimal part.
So 25 26 27 could represent 252627 but maybe you are looking for something different.

Can you elaborate more on your use case and what is to achieve in detail? Thanks

we assume that not an int32 Array is needed otherwise we would do:
arrInts = strVar.Split(" "c).Select(Function (x) CInt(x)).ToArray

1 Like

@Vinay_Talebailkar

25,26,27 is not a proper integer format

may I know how you need it and why you need a comma for integer? ideally integers are not stored with comma in memory…

cheers

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