docs
                                
                                 docs copied to clipboard
                                
                                    docs copied to clipboard
                            
                            
                            
                        [Breaking change]: Type.GetType throws TypeLoadException
Old behavior
Type.GetType(string) throws TypeLoadException for most types with invalid element type, except a few corner cases such as byref-of-byref.
New behavior
Type.GetType throws TypeLoadException for all types with invalid element type, including byref-of-byref.
Example
- Type.GetType("System.Object&&")- returns null in .NET 7, throws- TypeLoadExceptionin .NET 8
- Type.GetType("System.TypedReference[]")- throws- TypeLoadExceptionin all .NET versions
Introduced by https://github.com/dotnet/runtime/pull/83484.
More context: https://github.com/dotnet/runtime/issues/98426