Using IProgress<T>
suggest changeSystem.Progress<T> implements Report explicitly, as a member of IProgress<T>. Call it on an IProgress<T> reference, or cast the Progress<T> to that interface.
var p1 = new Progress<int>();
p1.Report(1); //compiler error, Progress does not contain method 'Report'
IProgress<int> p2 = new Progress<int>();
p2.Report(2); //works
var p3 = new Progress<int>();
((IProgress<int>)p3).Report(3); //works
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents