Simple overloading without complications

Kagamin via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Jul 12 01:52:26 PDT 2016


Extract functions for shared parts:

void Do(string name)
{
     DoStuff();
     int i = find(name);
     DoStuffWithIndex(i);
}

void Do(int name)
{
     DoStuff();
     DoStuffWithIndex(i);
}


More information about the Digitalmars-d-learn mailing list