Пример #1
0
			ErrorValue TryError (string error, ErrorValue ret)
			{
				if (error == null)
					throw new Exception ("Invalid error");
				
				string sub = s.Substring (pos);
				
				if (s.StartsWith (error)){
					pos += error.Length;
					return ret;
				}
				return null;
			}
Пример #2
0
            ErrorValue TryError(string error, ErrorValue ret)
            {
                if (error == null)
                {
                    throw new Exception("Invalid error");
                }

                string sub = s.Substring(pos);

                if (s.StartsWith(error))
                {
                    pos += error.Length;
                    return(ret);
                }
                return(null);
            }