-// cs0117-3.cs: `A' does not contain a definition for `Foo'
-// Line: 16
+// CS0117: `Color' does not contain a definition for `Transparent'
+// Line:
+
using System;
-using System.Runtime.CompilerServices;
-class A
+struct Color
{
- [IndexerName ("Foo")]
- public int this [int index] {
- get { return index; }
- set { ; }
- }
+}
- static void Test (A a, int value)
+static class ExtensionMethods
+{
+ public static Color Transparent (this Color c)
{
- a.Foo = value;
+ return new Color ();
}
+}
+class MainClass
+{
public static void Main ()
{
- Test (new A (), 9);
+ var c = Color.Transparent ();
}
}