Usage
Usage of the Unit
type is very simple, here are some facts:
Equality checks
- All
Unit
s are equal to each other, thereforeUnit == Unit
istrue
Unit != Unit
isfalse
Unit < or > Unit
isfalse
Unit <= or >= Unit
istrue
Equals(Unit)
method returnstrue
Equals(object)
method returnsfalse
when given any object which is not aUnit
CompareTo(Unit)
method returns0
Hash code
Unit.GetHashCode()
method always returns 804741542
String representation
Unit.ToString()
method always returns ()
Namespace
Besides the fact, that all modern C# editors by now have an option to include using
directives automatically, you may need it anyways, so here it is:
cs
using Dvchevskii.Unit;