コード例 #1
0
 /// <summary>
 /// Adds a CVar object to the variable list only if no other variable with the same name exists.
 /// </summary>
 /// <param name="variable">The CVar object to add</param>
 public void SetNew(CVar variable)
 {
     if (!VariableExists(variable.Name))
     {
         Set(variable);
     }
 }
コード例 #2
0
        /// <summary>
        /// Adds a CVar object to the variable list.
        /// </summary>
        /// <param name="variable">The CVar object to add</param>
        public void Set(CVar variable)
        {
            // First of all remove any old variable with the same name
            Remove(variable.Name);

            // Then add the new one
            All.Add(variable);
        }