CloneBase() публичный Метод

public CloneBase ( ) : object
Результат object
Пример #1
0
        public void TreeNode_Method_Clone()
        {
            PokerTreeNode tn1 = new PokerTreeNode();
            TreeNode      tn2 = new TreeNode();

            tn1.Text  = "CloneThisNode";
            tn1.Value = "111";
            Assert.AreEqual(string.Empty, tn2.Text, "BeforeClone1");
            Assert.AreEqual(string.Empty, tn2.Value, "BeforeClone2");
            tn2 = (TreeNode)tn1.CloneBase();
            Assert.AreEqual("CloneThisNode", tn2.Text, "AfterClone1");
            Assert.AreEqual("111", tn2.Value, "AfterClone2");
        }
		public void TreeNode_Method_Clone () {
			PokerTreeNode tn1 = new PokerTreeNode ();
			TreeNode tn2 = new TreeNode ();
			tn1.Text = "CloneThisNode";
			tn1.Value = "111";
			Assert.AreEqual (string.Empty, tn2.Text, "BeforeClone1");
			Assert.AreEqual (string.Empty, tn2.Value, "BeforeClone2");
			tn2 = (TreeNode) tn1.CloneBase ();
			Assert.AreEqual ("CloneThisNode", tn2.Text, "AfterClone1");
			Assert.AreEqual ("111", tn2.Value, "AfterClone2");
		}