Skip to content

Instantly share code, notes, and snippets.

@FoC-
Created December 4, 2012 13:14
Show Gist options
  • Select an option

  • Save FoC-/4203761 to your computer and use it in GitHub Desktop.

Select an option

Save FoC-/4203761 to your computer and use it in GitHub Desktop.
Resharper bug
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