bool FindAndRemove(ref string sBodyStruct, char ch) { sBodyStruct = sBodyStruct.Trim(); if (sBodyStruct[0] != ch) { string sLog = "Invalid Body Structure " + sBodyStruct + "."; Log(LogTypeEnum.ERROR, sLog); return false; } // remove character sBodyStruct = sBodyStruct.Substring(1); return true; }