[Solved] Reading a specific column from a text file in C# [closed]

[ad_1]

You haven’t given much details on the format of the file. Just to get you started, you can try something like(using System.Text.RegularExpressions):

File.ReadLines("path").Sum(
    line 
        => 
    int.Parse(Regex.Match(line, @"Hours:\s(\d+)").Groups[1].Value))

[ad_2]

solved Reading a specific column from a text file in C# [closed]