KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have an array of strings called "Cars" I would like to get the first index of the array is either null, or the value stored is empty. This is what I got so far: private static string[] Cars; Cars = new string[10]; var result = Cars.Where(i => i==null || i.Length == 0).First(); But how do I get the first INDEX of such an occurrence? For example: Cars[0] = "Acura"; then the index should return 1 as the next available spot in the array.
Tags (comma-separated)
Save Edits
Cancel