i am using c# and i need some help in this…
i have 2 strings
s1="1234"
s2="5678"
i want to create 2 integers so that they become equal to the 1st 2 characters and convert to int. ie
int i1=12 12 is the 1st 2 characters from s1
int i2=56 56 is the 1st 2 characters from s2
Simple:
You’ll have to add various checks, though (say, what happens if the length of either string is less than 2? or if they contain something other than digits?)