testrational.cs
来自「csharp-solution,C#高效编程源码」· CS 代码 · 共 21 行
CS
21 行
namespace Rational
{
using System;
// Test harness
public class TestRational
{
public static void Main()
{
System.Reflection.MemberInfo attrInfo;
attrInfo = typeof(Rational);
object [] attrs = attrInfo.GetCustomAttributes();
CustomAttribute.DeveloperInfoAttribute developerAttr;
developerAttr = (CustomAttribute.DeveloperInfoAttribute)attrs[0];
Console.WriteLine("Developer: {0}\tDate: {1}", developerAttr.Developer, developerAttr.Date);
developerAttr = (CustomAttribute.DeveloperInfoAttribute)attrs[1];
Console.WriteLine("Developer: {0}\tDate: {1}", developerAttr.Developer, developerAttr.Date);
}
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?