-
Notifications
You must be signed in to change notification settings - Fork 0
/
Generictypename.cs
46 lines (31 loc) · 938 Bytes
/
Generictypename.cs
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
41
42
43
44
45
46
# if false
using System;
using System.Collections.Generic;
using System.Collections;
using System.Diagnostics;
using System.IO;
using System.Reflection;
public static class Programm {
public static void Main(string[] args) {
Console.WriteLine("==== GenericTypeName ====\n");
// var type = typeof(BestGeneric<int,int>);
// Console.WriteLine(type.Name);
var t = typeof(Programm);
var memberInfos = t.GetMember("CreateDelayedAction");
var m = memberInfos[0];
if (m is MethodInfo method) {
foreach (var p in method.GetParameters()) {
Console.WriteLine(p.Name);
Console.WriteLine(p.ParameterType);
}
}
}
public class BestGeneric<T,T2> {
}
public static void M(Func<int> func) {
}
public static IEntity CreateDelayedAction(Action<int> action) {
return null;
}
}
# endif