Pretty sure my mind just blew. Guess it's time to restart Visual Studio. Errors get really funky when you have .xaml files open sometimes. WOW!!
Name of client is blacked out.
Hope this gets a laugh or two!
private string GetCRMOptionSetLabel(IOrganizationService service, string entityname, string optionsetname, int value)
{
RetrieveAttributeRequest reqOptionSet = new RetrieveAttributeRequest();
reqOptionSet.EntityLogicalName = entityname;
reqOptionSet.LogicalName = optionsetname;
RetrieveAttributeResponse resp = (RetrieveAttributeResponse)service.Execute(reqOptionSet);
PicklistAttributeMetadata opdata = (PicklistAttributeMetadata)resp.AttributeMetadata;
var option = opdata.OptionSet.Options.FirstOrDefault(o => o.Value == value);
return option.Label.LocalizedLabels.FirstOrDefault().Label;
}