SystemUtil
Description
Provides static helper method for dealing with objects.
This class provides some helper methods, dealing with the following:
-
Comparison methods, compatible with EqualsDelegate, see
Compare*
. -
Type conversion methods, see
Convert*
. -
Equality methods, compatible with HashCodeDelegate.
-
Hash code methods, compatible with CompareDelegate, see
HashCode*
. -
Helpers for estimating memory consumption, see
MemoryConsumptionOf*
. -
Pin object references, for safely passing them around as IntPtr values.
Public / Methods
CompareObject
Compares the given nullable objects, where null
appears first.
This method should not be used on the string type. Consider using StringUtil.Compare instead, if platform and culture independent behaviour is desired.
- See also
EqualsBag
Checks if the given collections are equal.
The given collection references are equal if one of the following conditions is true:
-
They refer to the same collection instance.
-
They are both
null.
-
first in contains all elements of second in and vice versa, which includes the case that both collections are empty.
EqualsVector
Checks if the given lists are equal.
The given list references are equal if one of the following conditions is true:
-
They refer to the same list instance.
-
They are both
null.
-
The two lists contain the same sequence of elements, where element equality is determined by the IEquatable implementation of the given IVectorConst objects.
MemoryConsumptionOf
13 overloads
Returns the estimated memory consumption of the given thing.
Returns the estimated memory consumption of the given thing.
Returns the estimated memory consumption of the given thing.
Returns the estimated memory consumption of the given thing.
Returns the estimated memory consumption of the given thing.
Returns the estimated memory consumption of the given thing.
Returns the estimated memory consumption of the given thing.
Returns the estimated memory consumption of the given thing.
Returns the estimated memory consumption of the given thing.
Returns the estimated memory consumption of the given thing.
Returns the estimated memory consumption of the given array of things.
Returns the estimated memory consumption of the given things.
Returns the estimated memory consumption of the given things.