S
shapper
Hello,
I have the following:
Article.Tags = Article.TagsCsv.Split(new char[] { ',' },
StringSplitOptions.RemoveEmptyEntries).Select(t => new YTag() { Name =
t.Trim() }).ToList();
This works fine but when TagsCsv is empty I get an error.
Is there a way to solve this without needing to add an IF?
Thanks,
Miguel
I have the following:
Article.Tags = Article.TagsCsv.Split(new char[] { ',' },
StringSplitOptions.RemoveEmptyEntries).Select(t => new YTag() { Name =
t.Trim() }).ToList();
This works fine but when TagsCsv is empty I get an error.
Is there a way to solve this without needing to add an IF?
Thanks,
Miguel