Hey @kimbell,
Java 8 introduces “Default Method” or (Defender methods) new feature, which allows a developer to add new methods to the Interfaces without breaking the existing implementation of these interfaces.
Here is the relevant part from the video.
Yes, when you compile an assembly against .NET Standard 2.x, your resulting assembly will (mostly) have references to
netstandard.dll
, as opposed to mscorlib
or System.Runtime
. So as far as .NET Standard 2.x is concerned, MemoryStream
lives in netstandard
.When your library is consumed on a specific platform, say, .NET Core, there is a corresponding
netstandard.dll
which type forwards all the types from .NET Standard where they live in that particular .NET platform. For .NET Core, this means System.IO
, on .NET Framework this means mscorlib
.When decompiling an assembly, you can easily see what other assemblies are referenced. How will this work in a netstandard.dll world? Will all I see be the netstandard.dll?
It will work the same way. It's just that when you compile against .NET Standard, the compiler will mostly only ever see
netstandard.dll
. You'll only see additional assemblies when you're adding references to components that are available for .NET Standard as extensions, such as the Windows registry or JSON.NET.