I am trying to write a function that will pull the name of a property and the type using syntax like bellow
private class SomeClass
{
Public string Col1;
}
PropertyMapper<Somewhere> propertyMapper = new PropertyMapper<Somewhere>();
propertyMapper.MapProperty(x => x.Col1)
Is there any why to pass the property through to the function with out any major changes to this syntax.
What i would like to pull out is the property name and the property type.
so in the example bellow i would want to retrive name = "Col1" and type = "System.String"
Can anyone help.
Cheers Colin G