I just tried to get a little deeper into the relationship between .NET 4.5 / .NET 4.5 for Metro / WinRT applications.
I realized that the reference assemblies for .NET Metro (which are located in Program Files (x86) \ Reference Assemblies \ Microsoft \ Framework.NETCore \ v4.5) determine the type of System.String in the reference assembly system. Duration However, the reference assemblies for "regular" .NET 4.5 define the type of System.String in mscorlib, while the System.Runtime Reference Assembly is empty.
At first, I thought that this could be due to the fact that metro-based applications can use another string implementation, which is necessary for communication with the native WinRT level. However, I tried the following code in the console application, as well as in the Metro Style application:
System.String k = "abc"; var m = k.GetType (). AssemblyQualifiedName.
And guess what: In both cases, the hosting assembly for the string is the same mscorlib.
So, why has Microsoft not just defined all these primitive types in mscorlib, as they are always used to?
Thanks TH
source share