public OctRoute Insert(int index, byte value) { OctRoute result = Clone(); result.values[index] = value; return(result); }
private OctRoute Clone() { var result = new OctRoute(); for (int i = 0; i < values.Length; i++) { result.values[i] = values[i]; } return(result); }
public static OctRoute Parse(string hexRoute) { var route = long.Parse(hexRoute, NumberStyles.HexNumber); var result = new OctRoute(); int index = result.values.Length; do { result.values[index - 1] = Convert.ToByte(route % OctCapacity); index--; route = route / OctCapacity; }while (route > 0); return(result); }