Created
December 4, 2012 13:14
-
-
Save FoC-/4203761 to your computer and use it in GitHub Desktop.
Resharper bug
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
| using System; | |
| namespace ConsoleApplication1 | |
| { | |
| class Program | |
| { | |
| static void Main(string[] args) | |
| { | |
| var sellers = new string[2, 2]; | |
| sellers[1, 1] = Seller.Amazon.ToString(); | |
| Console.Write(Verify(sellers)); | |
| Console.ReadLine(); | |
| } | |
| static bool Verify(string[,] sellers) | |
| { | |
| //resharper suggestion here: Loop can be converted into LINQ-expression. | |
| //but after conversion unable to compile code | |
| foreach (string seller in sellers) | |
| if (seller == Seller.Amazon.ToString()) return true; | |
| return false; | |
| } | |
| } | |
| public enum Seller | |
| { | |
| Wallmart, | |
| Amazon | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment