<p>Haven't fired up reflector to look at the difference but would one expect to see the exact same compiled code when comparing <code>Func&lt;T, bool&gt;</code>  vs. <code>Predicate&lt;T&gt;</code> </p>

<p>I would imagine there is no difference as both take a generic parameter and return bool?</p>

[{'answer_id': 32778, 'author': 'Robert S.', 'author_id': 3426, 'author_profile': 'https://Stackoverflow.com/users/3426', 'pm_score': 5, 'selected': True, 'text': "<p>They share the same signature, but they're still different types.</p>\n"}, {'answer_id': 36872, 'author': 'ljs', 'author_id': 3394, 'author_profile': 'https://Stackoverflow.com/users/3394', 'pm_score': 4, 'selected': False, 'text': '<p>Robert S. is completely correct; for example:-</p>\n\n<pre><code>class A {\n  static void Main() {\n    Func&lt;int, bool&gt; func = i =&gt; i &gt; 100;\n    Predicate&lt;int&gt; pred = i =&gt; i &gt; 100;\n\n    Test&lt;int&gt;(pred, 150);\n    Test&lt;int&gt;(func, 150); // Error\n  }\n\n  static void Test&lt;T&gt;(Predicate&lt;T&gt; pred, T val) {\n    Console.WriteLine(pred(val) ? "true" : "false");\n  }\n}\n</code></pre>\n'}, {'answer_id': 1735428, 'author': 'xyz', 'author_id': 82, 'author_profile': 'https://Stackoverflow.com/users/82', 'pm_score': 2, 'selected': False, 'text': '<p>The more flexible <code>Func</code> family only arrived in .NET 3.5, so it will functionally duplicate types that had to be included earlier out of necessity.</p>\n\n<p>(Plus the name <code>Predicate</code> communicates the intended usage to readers of the source code)</p>\n'}, {'answer_id': 15046050, 'author': 'Jeppe Stig Nielsen', 'author_id': 1336654, 'author_profile': 'https://Stackoverflow.com/users/1336654', 'pm_score': 0, 'selected': False, 'text': '<p>Even without generics, you can have different delegate types that are identical in signatures and return types. For example:</p>\n\n<pre><code>namespace N\n{\n  // Represents a method that takes in a string and checks to see\n  // if this string has some predicate (i.e. meets some criteria)\n  // or not.\n  internal delegate bool StringPredicate(string stringToTest);\n\n  // Represents a method that takes in a string representing a\n  // yes/no or true/false value and returns the boolean value which\n  // corresponds to this string\n  internal delegate bool BooleanParser(string stringToConvert);\n}\n</code></pre>\n\n<p>In the above example, the two non-generic types have the same signature and return type. (And actually also the same as <code>Predicate&lt;string&gt;</code> and <code>Func&lt;string, bool&gt;</code>). But as I tried to indicate, the "meaning" of the two are different.</p>\n\n<p>This is somewhat like if I make two classes, <code>class Car { string Color; decimal Price; }</code> and <code>class Person { string FullName; decimal BodyMassIndex; }</code>, then just because both of them hold a <code>string</code> and a <code>decimal</code>, that doesn\'t mean they\'re the "same" type.</p>\n'}]
['https://Stackoverflow.com/questions/32709', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/2993/']