Xamarin Public Jenkins 6992685b86 Imported Upstream version 4.2.0.179
Former-commit-id: 0a113cb3a6feb7873f632839b1307cc6033cd595
2015-11-10 14:54:39 +00:00

43 lines
639 B
C#

using System;
using System.Linq;
using System.Reflection;
class Program
{
public static int Main ()
{
var setter = typeof (MyClass).GetMember("set_Item")[0] as MethodInfo;
var sp = setter.GetParameters ();
var first = sp [0].GetCustomAttributes ();
var value = sp [2].GetCustomAttributes ();
if (first.Count () != 0)
return 1;
if (value.Count () != 1)
return 2;
return 0;
}
}
[AttributeUsage(AttributeTargets.All)]
public class MyAttribute2Attribute : Attribute
{
}
public class MyClass
{
public string this[int index1, int index2]
{
get
{
return "";
}
[param: MyAttribute2]
set
{
}
}
}