Hej
Assuming I have some code that looks like this:
List<User> userList = GetUserByName (u => u.Name == name); DoSomethingWithTheUsers (userList.ToArray ());
Now I want to find out the type of objects in the array in the DoSomethingWithTheUsers (object [] myObjects) method
Just done myObjects.First (). GetType (), but what if the array is empty? Is it possible to still get the type?
source share