Attribute
来源:互联网 发布:犀牛设计软件视频教程 编辑:程序博客网 时间:2024/04/28 06:59
using System;using System.Collections.Generic;using System.Linq;using System.Reflection;using System.ServiceModel;using System.ServiceModel.Description;using System.Text;using System.Threading.Tasks;using WcfServiceLibrary1;namespace ConsoleApplication1{ class Program { static void Main(string[] args) { MemberInfo info = typeof(Steden).GetProperty("ID"); //GetMethod TestAttribute t = (TestAttribute)Attribute.GetCustomAttribute(info, typeof(TestAttribute)); Console.WriteLine(t.Name+"====="+t.Paw); } } [Test("A1",Paw ="pp")] public class Steden { [Test("OO",Paw ="OO")] public void Get() { } [Test("ID", Paw = "ID_Paw")] public int ID { get; set; } } public class TestAttribute : Attribute { public TestAttribute(string _name) { this.Name = _name; } public string Name { get; set; } public string Paw { get; set; } }}
0 0
- Attribute
- Attribute
- attribute
- attribute
- attribute
- attribute
- attribute
- attribute
- Attribute
- Attribute
- Attribute
- Attribute
- C#Attribute & Attribute Reflacion
- Attribute Selectors
- <XSL:attribute
- 认识一下Attribute
- C# Attribute
- C# Attribute
- Linux时间子系统之六:高精度定时器(HRTIMER)的原理和实现
- quartz使用(一)
- Linux select poll epoll 区别比较
- 第二阶段 3、模拟多任务下载
- Linux时间子系统之七:定时器的应用--msleep(),hrtimer_nanosleep()
- Attribute
- 国内机票预订api调用
- Linux时间子系统之八:动态时钟框架(CONFIG_NO_HZ、tickless)
- 《深入理解SPARK:核心思想与源码分析》(第1章)
- hybris trail goal
- python数字图像处理(4):图像数据类型及颜色空间转换
- centos挂载SSD
- Android开发中使用软引用和弱引用
- Sublime text 2/3 [Decode error - output not utf-8] 完美解决方法