public object Clone() { SVVarDefine r = new SVVarDefine(); r.VarName = this.VarName; r.VarBlockType = this.VarBlockType; return(r); }
/// <summary> /// 用来在结构中能够使用Contains函数来判断重复性 /// </summary> /// <param name="other"></param> /// <returns>true-表示已经存在,false-表示不存在</returns> public override bool Equals(object other) { SVVarDefine otherVar = other as SVVarDefine; if (otherVar == null) { return(true); } if (this.VarName == otherVar.VarName && this.VarBlockType == otherVar.VarBlockType) { return(true); } return(false); }