Let's say:
public interface IBase
{
}
public class Derived : IBase
{
}
While doing
Derived instance_ = new CDrv();
Ibase ibase = instance_;
Is this an implicit conversion or assignment?
Is it possible to create a clone instance_and assign / convert to ibase, possibly by overriding the conversion or assignment operator or some other method?
Or, in other words, is there a way to pass instance_by value and not make it struct? I do not want this to be a structure, because I have a number of functions that return Derived, and the specified conversion / assignment will rarely occur.
source
share