理解.NET中的CLR原理(二)[7]

[入库:2005年8月18日] [更新:2007年3月24日]

本文简介:选择自 yarshray 的 blog

下面我们来使用上面的元数据:

using system.relection;

using system;

namespace yarshrayapp{

public class yarshrayconsoleapp

{  

 

public  static void main()

{

memberinfor om;

om=typeof(yarshraytest);

object o;

o=om.getcustomattribute(typeof(yarshray),true);

yarshrayattribute ya=( yarshrayattribute)o;

console.writeline(“name:”+ys.name);

console.writeline(“age:”+ys.age);

console.writeline(“sex:”+ys.sex);

}

}

本文关键:CLR .NET yarshray
  相关方案
Google
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top