Say, I have an interface
public interface ISomeControl
{
Control MyControl { get; }
...
}
Is it possible to define something like this:
public static implicit operator Control(ISomeControl ctrl)
{
return ctrl.MyControl;
}
Or rather why can't I do that in C#?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…