mirror of
https://github.com/BepInEx/dotnet-runtime.git
synced 2026-11-24 16:43:13 -10:00
Implement IEquatable<T> on internal class in System.Xml.XPath and DataContractSerialization. Remove redundant null-checks in Equals that will just be checked again. Do reference-equals test instead of both-null test. Same cost, and allows for short-circuit true in reference-equals case. Remove redundant null-check before is check. Will return false on null anyway. Unbox to local variable rather than unboxing twice. Use as-and-null-test instead of is followed by cast. Commit migrated from https://github.com/dotnet/corefx/commit/3457816c8ad189c8b74684a99e7a606d5c579a85