Gets next value of the variable name sequencer, optionally resetting it if it has reached a certain maximum.
The next value of the sequencer.
This function is threadsafe and can be used to generate unique variable names. The sequencer is incremented before the value is returned.
string list = "";
for(int n = 0; n < 5; n++) {
list += "id" + MainUtil.GetNextVarNameSequence(10000).ToString() + ",";
}
// id12,id13,id14,id15,id16
MainUtil Class | Sitecore Namespace | GetNextSequence