c# - convert string to int with losing everything but digits -


i have string

string = "234234324\r\n"; 

i want parse string integer losing \r\n part, int should contain digits string int b = 234234324;

p.s. string not contain \r\n part, point want use digits string.

i tried convert.toint32(a) have error.

int b = int.parse(new string(a.where(char.isdigit).toarray())); 

Comments

Popular posts from this blog

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

gcc - Calling fftR4() in c from assembly -

Function that returns a formatted array in VBA -