Getting value by key from Exception.Data c#
foreach (DictionaryEntry de in ex.Data)
{
if (de.Key == "something")
{
//do something
}
}
If you know the key it would be much more efficient to use the Dictionary for what it is good for:
var yourObj = ex.Data["your_key"];