forked from IvanMurzak/ReflectorNet
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTestShortName.cs
More file actions
27 lines (24 loc) · 742 Bytes
/
TestShortName.cs
File metadata and controls
27 lines (24 loc) · 742 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
using System;
using System.Collections.Generic;
using System.Linq;
using com.IvanMurzak.ReflectorNet.Utils;
namespace TestNamespace
{
public class Outer<T>
{
public class Nested { }
}
}
public class Program
{
public static void Main()
{
var type = typeof(TestNamespace.Outer<int>.Nested);
Console.WriteLine($"Type: {type.FullName}");
Console.WriteLine($"Type.Name: {type.Name}");
Console.WriteLine($"IsGenericType: {type.IsGenericType}");
Console.WriteLine($"GenericArgs: {string.Join(", ", type.GetGenericArguments().Select(t => t.Name))}");
// Simulate GetTypeShortName logic
Console.WriteLine($"ShortName: {TypeUtils.GetTypeShortName(type)}");
}
}