Just for completeness, here's several Linq answers:
var stringsOmittingFirstIfEmpty = temp3.Skip(temp3[0] == "" ? 1 : 0);
var stringsOmittingFirstIfEmpty = temp3.Skip(string.IsNullOrEmpty(temp3[0]) ? 1 : 0);
var stringsOmittingFirstIfEmpty = temp3.Skip(1-Math.Sign(temp3[0].Length)); // Yuck! :)
I don't think I'd actually use any of these (especially the last, which is really a joke).
I'd probably go for:
bool isFirst = true;
foreach (var item in temp3)
{
if (!isFirst || !string.IsNullOrEmpty(item))
{
// Process item.
}
isFirst = false;
}
Or
bool isFirst = true;
foreach (var item in temp3)
{
if (!isFirst || item != "")
{
// Process item.
}
isFirst = false;
}
Or even
bool passedFirst = false;
foreach (var item in temp3)
{
Contract.Assume(item != null);
if (passedFirst || item != "")
{
// Process item.
}
passedFirst = true;
}