prop.cs

来自「.net的数据持久层」· CS 代码 · 共 35 行

CS
35
字号
using System;
using System.Reflection;

namespace Platform.Data {

	public class Prop {

		private PropertyInfo _Property;

		public string PropertyName {
			get { return this.Property.Name; }
		}

		public PropertyInfo Property {
			get { return _Property; }
			set { _Property = value; }
		}

		public object GetValue( object obj ){
			return this.Property.GetValue( obj, null );
		}

		public void SetValue( object obj, object value){
			this.Property.SetValue( obj, value, null );
		}

		public Prop() {
		}

		public Prop(PropertyInfo p) {
			this.Property = p;
		}
	}
}

⌨️ 快捷键说明

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