Is is possible to implement a type specifier with 2 interfaces in .net? Something like:
Public Sub New(obj as ICollection and INotifyCollectionChanged)
''Initialize Code
End Sub
No, you will have to define an interface that inherits from both of your desired interfaces.
Public Interface IMyCombinedInterface
Inherits IColllection, INotifyCollectionChanged
End Interface
You can with generic constraints; for example in c#:
public void Something<T>(T obj)
where T : IFoo, IBar
{....}
Then Something(value) will work only when value is typed as something that implements both IFoo and IBar.
Public Function Foo(x as {iBar, iBaz}) As Boolean