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

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

public class MethodAttribute : Attribute {}
public class ReturnAttribute : Attribute {}

public class Test {
	[Method]
	[return: Return]
	public void Method () {}

	public static int Main () {

		Type t = typeof(Test);
		MethodInfo mi = t.GetMethod ("Method");
		ICustomAttributeProvider cap = mi.ReturnTypeCustomAttributes;

		if (cap != null) 
			return 0;			
		else
			return 1;
	}
}