⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 main.cs

📁 Microsoft?Visual C#?.NET (Core Reference)
💻 CS
字号:
using System;
using System.Xml.Serialization;
namespace MSPress.CSharpCoreRef.Authoring
{
	class AuthoringApp
	{
		static void Main(string[] args)
		{
            Type t = typeof(Sailboat);
            AuthorAttributeCheck check = new AuthorAttributeCheck(t);
            string name = check.GetAuthorName();
            if(name != null)
                Console.WriteLine("The author's name is: {0}", name);
            name = check.GetAuthorName();
            if(name != null)
                Console.WriteLine("The author's name is: {0}", name);

            string notes = check.GetNotes();
            if(notes != null)
                Console.WriteLine("The author's notes are: {0}", notes);

            string[] authorInfo = check.GetAllMemberAuthorInfo();
            foreach(string authorName in authorInfo)
            {
                Console.WriteLine(authorName);
            }

            string[] authorInfo2 = check.GetMemberAuthorInfo("Text");
            foreach(string authorName in authorInfo2)
            {
                Console.WriteLine(authorName);
            }
            name = check.GetAssemblyAuthorName("Authoring");
            Console.WriteLine("Assembly author attribute: {0}", name);
            Console.WriteLine("done");
        }

	}

    [Author("Mickey")]
    class Foo
    {
        [Author("Mickey")]
        public void Show()
        {
        }

        [Author("Mickey")]
        public void Hide()
        {
        }

        [Author("Mickey")]
        [XmlIgnore()]
        public int Size;

        [Author("Mickey")]
        public string Text
        {
            get {return "Hello";}
        }
    }

    [Obsolete("Use the new BubbleSorter class")]
    class BubbleSort
    {
    }

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -