Clone() public method

Creates a new object that is a copy of the current instance.
public Clone ( ) : object
return object
示例#1
0
 /// <summary>
 /// Starts tracking changes in the underlying <see cref="RmResource"/>.
 /// </summary>
 public void BeginChanges()
 {
     EnsureNotDisposed();
     lock (rmObject.attributes) {
         this.originalAttributes = new Dictionary <RmAttributeName, RmAttributeValue>();
         foreach (RmAttributeName key in rmObject.attributes.Keys)
         {
             RmAttributeValue value = rmObject.attributes[key];
             this.originalAttributes[key] = value.Clone() as RmAttributeValue;
         }
     }
 }