Skip to content

Commit

Permalink
Apply the solution, add the new test or that and simplified the test (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
zhuxb711 authored Apr 15, 2023
1 parent f4e7852 commit caae0d5
Show file tree
Hide file tree
Showing 2 changed files with 406 additions and 394 deletions.
2 changes: 1 addition & 1 deletion PInvoke/Shell32/Clipboard.cs
Original file line number Diff line number Diff line change
Expand Up @@ -753,7 +753,7 @@ private static CharSet GetCharSet(ClipCorrespondingTypeAttribute attr)
return charSet;
}

private static Encoding GetEncoding(ClipCorrespondingTypeAttribute attr) => (Encoding)Activator.CreateInstance(attr.EncodingType ?? typeof(UnicodeEncoding));
private static Encoding GetEncoding(ClipCorrespondingTypeAttribute attr) => (Encoding)Activator.CreateInstance(attr?.EncodingType ?? typeof(UnicodeEncoding));

/// <summary>
/// <para>
Expand Down
Loading

0 comments on commit caae0d5

Please sign in to comment.