Attribute to mark member variable of class as hint for sorting arrays of objects (both dynamic and static).
Supported member types for sorting are int, float, string and object
class SampleObject
{
int m_iMember;
void SampleObject(int i)
{
m_iMember = i;
}
}
void Test()
{
array<ref SampleObject> a = {SampleObject(5), SampleObject(2), SampleObject(7)};
foreach (
auto o: a)
Print(o.m_iMember);
a.Sort();
foreach (
auto o: a)
Print(o.m_iMember);
}
proto void Print(void var, LogLevel level=LogLevel.NORMAL)
Prints content of variable to console/log.
Attribute to mark member variable of class as hint for sorting arrays of objects (both dynamic and st...
Definition attributes.c:528