System.Drawing.Drawing2D.HatchBrush.Clone C# (CSharp) Method

Clone() public method

public Clone ( ) : object
return object
        public override object Clone()
        {
            return new HatchBrush (hatchStyle, foreColor, backColor);
        }

Usage Example

Example #1
0
		public void TestClone ()
		{
			HatchBrush hbr = new HatchBrush(HatchStyle.Cross, fgColor, bgColor);

			HatchBrush clone = (HatchBrush) hbr.Clone ();

			Assert.AreEqual (hbr.HatchStyle, clone.HatchStyle, "Clone#1");
			Assert.AreEqual (hbr.ForegroundColor, clone.ForegroundColor, "Clone#2");
			Assert.AreEqual (hbr.BackgroundColor, clone.BackgroundColor, "Clone#3");
		}