-
Notifications
You must be signed in to change notification settings - Fork 2k
Expand file tree
/
Copy pathA.cs
More file actions
40 lines (34 loc) · 798 Bytes
/
A.cs
File metadata and controls
40 lines (34 loc) · 798 Bytes
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
38
39
40
using System;
public abstract class A<T>
{
public abstract T Prop { get; }
public abstract T this[int index] { get; set; }
public abstract event EventHandler Event;
public void Apply(T t1) { }
public abstract object ToObject(T t2);
public object Field;
public A() { }
public A(T t) { }
~A() { }
public static A<T> operator +(A<T> a1, A<T> a2) { return a1; }
}
public class A2 : A<string>
{
public override string Prop => "";
public override string this[int i]
{
get { return ""; }
set { }
}
public override event EventHandler Event
{
add { }
remove { }
}
public override object ToObject(string t) => t;
public void M()
{
A2 other = new();
other.Apply("");
}
}