Take a look at the Split method to the get value you want and then convert it using TryParse.
Something that seems related to what you want to do: