Reputation: 32848
I have the following:
public void Delete<T, V>(T item, V repo)
where T : Microsoft.WindowsAzure.StorageClient.TableServiceEntity
where V : IAzureTable<T>
{
try
{
repo.Delete(item);
}
catch (Exception ex)
{
_ex.Errors.Add("", "Error when deleting");
throw _ex;
}
}
What I would like to do is to have the error message return "Error when deleting Account" or "Error when deleting Content". Account and Content are the class names (T). How can I get the actual name of the class and append to the error string?
Upvotes: 3
Views: 68