I found some code, but I'm not sure what is the purpose of return default of interface?
The interface is implemented by few classes
public ISocketDevicePart Parent => default(ISocketDevicePart);
public interface ISocketDevicePart
{
ISocketDevicePart Parent { get; }
IEnumerable<ISocketDevicePart> Childs { get; }
IXYOffset Offset { get; set; }
}
I'm not sure about result. Should it return null always?
Yes, the default of an interface-typed variable is null (it is treated as a reference type).
For completeness, you can view the entire default() list in the documentation.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With