public static int GetIdByName(string name) { int ret; if (!BrgAttachpoint.TryGetIdByName(name, out ret)) { throw new Exception("Invalid Attachpoint Name " + name + "!"); } return ret; }