{"id":788,"date":"2015-04-30T12:06:09","date_gmt":"2015-04-30T12:06:09","guid":{"rendered":"http:\/\/www.themissingdocs.net\/wordpress\/?p=788"},"modified":"2015-04-30T12:06:09","modified_gmt":"2015-04-30T12:06:09","slug":"net-4-6-rc-diff","status":"publish","type":"post","link":"https:\/\/www.themissingdocs.net\/?p=788","title":{"rendered":".Net 4.6 RC Diff"},"content":{"rendered":"<p>So its been a while since I last did a framework surface diff, but it seems my program still works.\u00a0 This time I diffed 4.6 RC vs 4.5.1.<\/p>\n<p>A few small things, but hiding in the middle is a bunch of new classes in System.Numerics which is nice.<\/p>\n<p>As usual this list is not complete, I skip things which I don&#8217;t think are worth mentioning.\u00a0 But that isn&#8217;t many things this time.<\/p>\n<ul>\n<li>System.Array.Empty&lt;T&gt;() &#8211; does what it says on the box.<\/li>\n<li>System.Buffer.MemoryCopy &#8211; like BlockCopy, but for raw memory pointers rather than arrays.<\/li>\n<li>Usual set of SQL Server database connection additions &#8211; column encryption, authentication types.<\/li>\n<li>DateTimeOffset supports conversion to\/from unix time in seconds\/milliseconds.<\/li>\n<li>System.Diagnostics.ProcessStartInfo now has an Environment property.\u00a0 Not sure what it does yet, given there is already the EnvironmentVariables property.<\/li>\n<li>Bunch of Event tracing stuff I have no idea about&#8230;<\/li>\n<li>System.FormattableString &#8211; seems to bunch a format string and its arguments together &#8211; but has no public constructor&#8230; But there is a static create method on System.Runtime.CompilerServices.FormattableStringFactory.<\/li>\n<li>System.GC &#8211; new &#8216;no GC&#8217; region methods which ensure there is enough memory before they start.\u00a0 Can also force a small object heap compaction.<\/li>\n<li>System.Globalization.CompareInfo.GetHashCode &#8211; can get a culture specific hashcode.<\/li>\n<li>System.IO.MemoryStream.TryGetBuffer &#8211; can get back an array segment when memory stream is constructed with offset\/length.<\/li>\n<li>Async methods for NamedPipeStream connection.<\/li>\n<li>Async methods for read\/write\/flush on UnmanagedMemoryStream<\/li>\n<li>Socket options for reusing ports.<\/li>\n<li>System Numerics adds Matrix3x2, Matrix4x4, Plane, Quaternion, Vector2, Vector3, Vector4.\u00a0 They are unfortunately all single precision, but the reasoning is justified &#8211; they are all hardware accelerated using SIMD.\u00a0 Interestingly the pre-release 4.6 documentation appears newer than the actual released code here.\u00a0 It documents many useful static methods which are not yet in the actual library.\u00a0 Also there is apparently a System.Vector&lt;T&gt; coming which works for any primitive type T, with a maximum rank dependent on SIMD register width.<\/li>\n<li>New assembly level attribute &#8211; DisablePrivateReflection &#8211; apparently does what it says&#8230;<\/li>\n<li>Asymmetric padding mode options for crypto.\u00a0 CNG supports RSA.\u00a0 Crypto random number generator can write random values to a subset of an array.<\/li>\n<li>WindowsIdentity.RunImpersonated &#8211; can now execute a delegate rather than having to set up an impersonation context.<\/li>\n<li>string.Format with format provider now has the small arg count optimization of explicit methods for 1 2 and 3 format args.<\/li>\n<li>System.Encoding has dropped default support for code page based encodings, you have to manually call RegisterProvider to have them supported??<\/li>\n<li>System.Encoding has a GetString which takes a byte pointer and length rather than just an array.<\/li>\n<li>StringBuilder has an Append which takes a char pointer and length rather than just an array.\u00a0 Also small arg count optimization with AppendFormat with format provider.<\/li>\n<li>System.Threading.AsyncLocal &#8211; interesting, not 100% clear what it does yet, but it sounds like thread local variables except with a value per &#8216;async flow&#8217; rather than per thread.<\/li>\n<li>Task creation methods for immediate cancelled\/exception states.<\/li>\n<li>Extension methods to get a safe wait handle given a wait handle.<\/li>\n<li>System.Uri.IdnHost &#8211; can get punycode version of international domain names.<\/li>\n<li>WPF diagnostics hook event for visible tree changes.<\/li>\n<li>System.Xml.XmlNode gets a PreviousText property.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>So its been a while since I last did a framework surface diff, but it seems my program still works.\u00a0 This time I diffed 4.6 RC vs 4.5.1. A few small things, but hiding in the middle is a bunch of new classes in System.Numerics which is nice. As usual this list is not complete, &hellip; <a href=\"https:\/\/www.themissingdocs.net\/?p=788\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">.Net 4.6 RC Diff<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-788","post","type-post","status-publish","format-standard","hentry","category-net-stuff"],"_links":{"self":[{"href":"https:\/\/www.themissingdocs.net\/index.php?rest_route=\/wp\/v2\/posts\/788","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.themissingdocs.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.themissingdocs.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.themissingdocs.net\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.themissingdocs.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=788"}],"version-history":[{"count":0,"href":"https:\/\/www.themissingdocs.net\/index.php?rest_route=\/wp\/v2\/posts\/788\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.themissingdocs.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=788"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.themissingdocs.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=788"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.themissingdocs.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=788"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}