Visual Basic (Declaration) | |
---|---|
Public Shared Function For(Of T)( _ ByVal expr As Expression(Of Func(Of T,Object)) _ ) As String |
Visual Basic (Usage) | ![]() |
---|---|
Dim expr As Expression(Of Func(Of T,Object)) Dim value As String value = PropertyPath.For(Of T)(expr) |
C# | |
---|---|
public static string For<T>( Expression<Func<T,object>> expr ) |
C++/CLI | |
---|---|
public: static String^ Forgeneric<typename T> ( Expression<Func<T^,Object^>^>^ expr ) |
Parameters
- expr
Type Parameters
- T
Example: var r = PropertyPath.For<Type>(t => t.Assembly.CodeBase.Length); will return "Assembly.CodeBase.Length".
Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family