I have this class/interface definitions in C#
public class FooBase {
...
protected bool Bar() { ... }
...
}
public interface IBar {
bool Bar();
}
Now I want to create a class Foo1 derived from FooBase implementing IBar:
public class Foo1 : FooBase, IBar {
}
Is there some class declaration magic that the compiler ta...
I have a base class (order) with a set of sub classes (productorder, specialorder, partsorder etc).
Only Some of these sub classes implement a particular interface (ITrackingCustomer) which has a single method declaration (object getcustdetails()).
As part of my solution all of my orders are processed in a central place, i.e. any cru...
I want to pass some ArrayList<Integer> X into method a(Collection<Integer> someCol) that takes Collection<Integer> as an input.
How can I do this? I thought an ArrayList was a Collection and thus I should be able to "just do it" but it seems that Collection is an interface and ArrayList implements this interface. Is there something I ca...
How to implement interface members "f" with the list?
public interface I
{
IEnumerable<int> f { get; set; }
}
public class C:I
{
public List<int> f { get; set; }
}
Error 1 'ClassLibrary1.C' does not implement interface member 'ClassLibrary1.I.f'. 'ClassLibrary1.C.f' cannot implement 'ClassLibrary1.I.f' because it does not hav...
Hi All
I am trying to create an ObservableConcurrentDictionary. This object will be used in a multithreaded application, and it's data is used to populate a control via the controls ItemsSource property.
This is the implementation i have come up with:
public sealed class ObservableConcurrentDictionary<TKey, TValue> : ConcurrentDiction...