public UnparsedLineModel(string line) { Line = line; if (string.IsNullOrEmpty(line)) { return; } LineEntries = line.Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries).Select(s => s.Trim()).ToArray(); double parsedValue = -1; IsValid = line.IndexOf(',') >= 0 && LineEntries.Length == 3 && !string.IsNullOrEmpty(PortfolioID) && (Tenor?.Any(char.IsDigit)).GetValueOrDefault() && (Tenor?.Any(char.IsLetter)).GetValueOrDefault() && double.TryParse(Value, out parsedValue) && ParsedTenor.IsValid; ParsedValue = parsedValue; }