public override bool IsEdit() { var builder = new StringBuilder(); builder.Append(Consts.SAMPLE_INTERFACE).Append(" ").Append(Consts.SAMPLE_VISA_PREFIX); var intfcEditPrefix = builder.ToString(); bool isEdit = false; if (DeviceName.Equals(Consts.SAMPLE_INTERFACE)) { isEdit = false; } else if (DeviceName.StartsWith(intfcEditPrefix)) { isEdit = true; } return(isEdit); }