Question: I have two enums

```js
public enum YogabandEventDuration
{
    [Display(Name = "30 min")]
    ThirtyMinutes = 30,
    [Display(Name = "45 min")]
    FortyFiveMinutes = 45,
    [Display(Name = "60 min")]
    SixtyMinutes = 60,
    [Display(Name = "75 min")]
    SeventyFiveMinutes = 75,
    [Display(Name = "90 min")]
    NinetyMinutes = 90
}

public enum PrivatePrice
{
    [Display(Name = "$8.95")]
    ThirtyMinute = 895,
    [Display(Name = "$14.95")]
    FortyFiveMinute = 1495,
    [Display(Name = "$19.95")]
    SixtyMinute = 1495,
    [Display(Name = "$24.95")]
    SeventyFiveMinute = 2495,
    [Display(Name = "$27.95")]
    NinetyMinute = 2795
}
```

Is there a way to match up the values in each enum 1-to-1 so that I can do a search like this

```
var theClassPrice = GetPrice(YogabandEventDuration);

```

and passing in ThirtyMinutes would return 895

Answer: 
Personally I would have gone with something like this, as per @SteveJ suggestion

```
var privateSession = new Dictionary<Session, double>()
{
   { Session.ThirtyMinute, 8.95},
   { Session.FortyFiveMinute, 14.95 },
   { Session.SixtyMinute, 19.95  },
   { Session.SeventyFiveMinute, 24.95 },
   { Session.NinetyMinute, 27.95 }
};

```

And then use an enum for session times

```
public enum Session
{
    ThirtyMinute,
    FortyFiveMinute,
    SixtyMinute,
    SeventyFiveMinute,
    NinetyMinute
}

```
Even if this is really Strange:
You can [parse](https://msdn.microsoft.com/en-us/library/essfb559(v=vs.110).aspx) a string to get it's enum equivalent value.

```
var time = YogabandEventDuration.ThrityMinutes.ToString();
var price = Enum.Parse(typeof(PrivatePrice), time );
var intValue = (int)price;

```

giving you a simple function as you ask :

```
private int GetPrice(YogabandEventDuration duration) {
    return (int)Enum.Parse(typeof(PrivatePrice), duration.ToString());
}

```