Class Utils
Extension methods and more ...
Inherited Members
Namespace: Evergine.Common.Helpers
Assembly: Evergine.Common.dll
Syntax
public static class Utils
Methods
CompareTo<T>(T[], T[])
Compare an array with other array.
Declaration
public static bool CompareTo<T>(this T[] array1, T[] array2) where T : IEquatable<T>
Parameters
Type | Name | Description |
---|---|---|
T[] | array1 | Specifies the array1. |
T[] | array2 | Specifies the array2. |
Returns
Type | Description |
---|---|
bool | True whether the array1 and array2 are equals or not otherwise. |
Type Parameters
Name | Description |
---|---|
T | The array type. |
DisposeAndNull<T>(ref T)
Safely dispose a reference if not null, and set it to null after dispose.
Declaration
public static void DisposeAndNull<T>(ref T disposable) where T : class, IDisposable
Parameters
Type | Name | Description |
---|---|---|
T | disposable | Object to dispose. |
Type Parameters
Name | Description |
---|---|
T | The type of object to dispose. |
Remarks
The reference will be set to null after dispose.