summaryrefslogtreecommitdiff
path: root/mcs/errors/cs0216-3.cs
blob: 333a9423508ea343f3b0eff44cf632b02c005948 (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
25
26
27
28
29
30
31
32
33
34
35
36
37
// CS0216: The operator `MyType.operator >(MyType, MyType)' requires a matching operator `<' to also be defined
// Line: 23

public struct MyType
{
	int value;

	public MyType (int value)
	{
		this.value = value;
	}

	public static bool operator == (MyType a, MyType b)
	{
		return a.value == b.value;
	}

	public static bool operator != (MyType a, MyType b)
	{
		return a.value != b.value;
	}
	
	public static bool operator > (MyType a, MyType b)
	{
		return a.value > b.value;
	}

	public static bool operator >= (MyType a, MyType b)
	{
		return a.value >= b.value;
	}	

	public override string ToString ()
	{
		return value.ToString ();
	}
}