# Microsoft.Win32

``` diff
 namespace Microsoft.Win32 {
     public sealed class RegistryKey : MarshalByRefObject, IDisposable {
-        public object? GetValue(string? name, object? defaultValue);
+        [return: NotNullIfNotNullAttribute("defaultValue")]
+        public object? GetValue(string? name, object? defaultValue);
-        public object? GetValue(string? name, object? defaultValue, RegistryValueOptions options);
+        [return: NotNullIfNotNullAttribute("defaultValue")]
+        public object? GetValue(string? name, object? defaultValue, RegistryValueOptions options);
     }
 }
```

