using System; public class ValueWrapper { private readonly Func _get; private readonly Action _set; public ValueWrapper(Func get, Action set) { _get = get; _set = set; } public T Value { get { return _get(); } set { _set(value); } } }