How to get values from SamlAttributes

Do you have a code example(preferably C#) on how to get values out of the Assertions.SAMLAttribute[]

Our recommendation is to use the SAML high-level API wherever possible.
The SAMLServiceProvider.ReceiveSSO method returns the SAML attributes in an IDictionary<string, string> where the keys are the SAML attribute names and the values are the SAML attribute values.
There’s also a SAMLServiceProvider.ReceiveSSO overload that returns a SAMLAttribute array. This is useful if you wish to access additional information (eg attribute friendly names) or if the attributes are multi-value.
The SAMLAttribute.Values property returns a list of AttributeValue objects.
The AttributeValue.Data property returns the actual attribute value.