The following should be faster, since it scans as many lines as needed to find two /, and this does not interfere with splitting the entire line:
string component = "";
string version = "";
string source = "Test/Company/Business/Department/Logs.tvs/v1";
int last = source.LastIndexOf('/');
if (last != -1)
{
int penultimate = source.LastIndexOf('/', last - 1);
version = source.Substring(last + 1);
component = source.Substring(penultimate + 1, last - penultimate - 1);
}
, : ! , .
( , , , ... , source null, lazy me.)