Reputation: 487
Looking at the definition of System.Dynamic.ExpandoObject i came across this:
public sealed class ExpandoObject : IDynamicMetaObjectProvider, IDictionary<string, object>, ICollection<KeyValuePair<string, object>>, IEnumerable<KeyValuePair<string, object>>, IEnumerable, INotifyPropertyChanged
{
public ExpandoObject();
}
Why does the ExpandoObject class not implement the interfaces?
Upvotes: 1
Views: 459
Reputation: 311
Using something like .Net Reflector you can see the implementation of each interface. The code is too long to post here but it is all in there. Simply do a search within reflector for the ExandoObject and you will see the members.
Upvotes: 1
Reputation: 62248
I used ILSpy on System.Core 4.0.0.0
and get
So implentations are present actually...
Upvotes: 0
Reputation: 46909
The ExpandoObject
has an explicit implementation of the interfaces.
Explicit implentation allows it to only be accessible when cast as the interface itself.
Upvotes: 2