Based on my Understanding interfaces are just protocol and do not have any implementation.
I'm trying to understand the following code:
This code works
Exception ex = new Exception();
ex.Data.Add("1", "One");
Because Data
is a property of type ListDictioaryInternal
(as shown by intelisence)) which implements IDictionary
.
However, if you right-click on Data
and go to the definition you see it is defined as:
public virtual IDictionary Data { get; }
Why Data
is not defined as ListDictioaryInternal
?