示例#1
0
		private string GetUniqueParameterName(NpgsqlParameterCollection parameters, string Prefix, int InitialPostfix){
			int Postfix = InitialPostfix;
			string ReturnValue = String.Empty;
			bool IsInside = true;
			while(IsInside){
				ReturnValue = String.Concat(Prefix, Postfix.ToString());
				if(parameters == null)
					break;
				IsInside = parameters.Contains(ReturnValue);
				Postfix++;
			}
			return ReturnValue;
		}
        private string GetUniqueParameterName(NpgsqlParameterCollection parameters, string Prefix, int InitialPostfix)
        {
            int    Postfix     = InitialPostfix;
            string ReturnValue = String.Empty;
            bool   IsInside    = true;

            while (IsInside)
            {
                ReturnValue = String.Concat(Prefix, Postfix.ToString());
                if (parameters == null)
                {
                    break;
                }
                IsInside = parameters.Contains(ReturnValue);
                Postfix++;
            }
            return(ReturnValue);
        }