Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gtest-408.cs « tests « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 64e21f452548c4ed114d6afb7c976de824b50ab3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
using System;
using System.Runtime.InteropServices;

public class Test
{
	public static int Main ()
	{
		object [] o = typeof (IFoo).GetMethod ("get_Item").GetParameters () [0].GetCustomAttributes (false);
		if (o.Length != 1)
			return 1;

		o = typeof (IFoo).GetMethod ("set_Item").GetParameters () [0].GetCustomAttributes (false);
		if (o.Length != 1)
			return 2;

		return 0;
	}

	public interface IFoo
	{
		int this [[MarshalAs (UnmanagedType.Struct)]object vt0BasedIdxOrId] { get; set; }
	}
}