Created
February 11, 2009 15:27
-
-
Save shoover/62065 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- for (int i = resolutions.Length - 1; i >= 1; i--) | |
+ foreach (object[] resolution in resolutions.Skip(1).Cast<object[]>().Reverse()) | |
{ | |
- object[] resolution = (object[])resolutions[i]; | |
- List<Transport> ret = new List<Transport>(); | |
- return ((object[])list).Select<object, Transport>(o => | |
- { | |
- object[] transport = o as object[]; | |
- if (transport == null) | |
- { | |
- return null; | |
- } | |
- | |
- return new Transport((string)transport[0], (string)transport[1]); | |
- }).Where<Transport>(t => t != null).ToArray<Transport>(); | |
+ return from o in ((object[])list).OfType<object[]>() | |
+ select new Transport((string)o[0], (string)o[1]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment