using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
class Program
{
private static StringBuilder OutputText = new StringBuilder();
static void AnalyzeType(Type t)
{
TypeInfo typeInfo = t.GetTypeInfo();
OutputText.Append($"Type Name :{typeInfo.Name}");
OutputText.Append($"Full Name :{typeInfo.FullName}");
OutputText.Append($"Type Name :{typeInfo.Name}");
OutputText.Append($"Namespace :{typeInfo.Namespace}");
Type tBase = t.BaseType;
if(tBase!=null)
OutputText.Append($"Base Type :{tBase.Name}");
AddToOutput("public members:");
foreach (MemberInfo memberInfo in t.GetMembers())
{
AddToOutput($"{memberInfo.Dec
C# Type 例子
最新推荐文章于 2025-04-26 14:43:07 发布