PurplePen.PunchcardFormat.Clone C# (CSharp) Method

Clone() public method

public Clone ( ) : object
return object
        public object Clone()
        {
            PunchcardFormat other = new PunchcardFormat();
            other.boxesAcross = boxesAcross;
            other.boxesDown = boxesDown;
            other.leftToRight = leftToRight;
            other.topToBottom = topToBottom;
            return other;
        }

Usage Example

Example #1
0
        // Set the punch card format for the event.
        public static void ChangePunchcardFormat(EventDB eventDB, PunchcardFormat punchcardFormat)
        {
            Event e = eventDB.GetEvent();

            e = (Event) e.Clone();
            e.punchcardFormat = (PunchcardFormat) punchcardFormat.Clone();

            eventDB.ChangeEvent(e);
        }