次のことを行う単純な関数を作成したいと思います。
Sub SetValue(Of TInstance As Class, TProperty)(
ByVal instance As TInstance,
ByVal [property] As Expression(Of Func(Of TInstance, TProperty)),
ByVal value As TProperty)
'...
End Sub
使用法:
Dim x As New Person
SetValue(x, Function(p) p.FirstName, "John Doe")