First, break it into subtitle sections - these are separated by a blank line.
Then, each section starts with a pair or time codes, separated by "-->".
So, read the whole file by using File.ReadAllLines, the scan it for empty lines using the String.IsNullOrWhitespace method.
Then split the second line of the section using String.Split to leave the start and end times as strings.
Process each time using
TimeSpan.TryParseExact Method (System) | Microsoft Docs[
^] and the rest is trivial.