Let's say I have a class that has 3 properties. I don't know which property I want to read until runtime. Is there a way to do this without a switch/if-else statement?

If a DataTable is treated as a class, then the columns can be treated dynamically which would work, but I'm not able to change my class into a DataTable (long story).

For a DataTable, the code would be:

```
string columnName = "Age";
int age = dataRow[columnName];

```

How is this possible in a class?

```
string propertyName = "Baka";
int age = item.getProperty(propertyName)  // ???

```