Add() public method

Adds an instance of type SqlConstant to the end of this SqlConstantCollection.
public Add ( SqlConstant value ) : void
value SqlConstant /// The SqlConstant to be added to the end of this SqlConstantCollection. ///
return void
		/// <summary>
		/// Creates a SqlConstantCollection from a list of values.
		/// </summary>
		/// <remarks>
		/// The type of SqlConstant items in the collection is determined automatically.
		/// See <see cref="Add"/> method for more info.
		/// </remarks>
		/// <param name="values"></param>
		/// <returns></returns>
		public static SqlConstantCollection FromList(IList values)
		{
			SqlConstantCollection collection = new SqlConstantCollection(values.Count);
			foreach (object val in values)
			{
				collection.Add(val);
			}
			return collection;
		}
Example #2
0
        /// <summary>
        /// Creates a SqlConstantCollection from a list of values.
        /// </summary>
        /// <remarks>
        /// The type of SqlConstant items in the collection is determined automatically.
        /// See <see cref="Add"/> method for more info.
        /// </remarks>
        /// <param name="values"></param>
        /// <returns></returns>
        public static SqlConstantCollection FromList(IList values)
        {
            SqlConstantCollection collection = new SqlConstantCollection(values.Count);

            foreach (object val in values)
            {
                collection.Add(val);
            }
            return(collection);
        }