Uzyskaj właściwość Wartość według nazwy ciągowej
Proszę wziąć pod uwagę tę klasę:
public static class Age
{
public static readonly string F1 = "18-25";
public static readonly string F2 = "26-35";
public static readonly string F3 = "36-45";
public static readonly string F4 = "46-55";
}
Chcę napisać funkcję, która otrzyma „F1” i zwróci „18-25”
private string GetValue(string PropertyName)
....
Jak mogę to zrobić?