System.Data.OleDb.OleDbCommand.Clone C# (CSharp) Method

Clone() public method

public Clone ( ) : object
return object
		public override object Clone() {
			OleDbCommand clone = (OleDbCommand)base.Clone();
			clone._currentParameterIndex = 0;
			clone._currentRefCursor = null;
			return clone;
		}

Usage Example

Esempio n. 1
0
        private static void Test_Command_Cancel()
        {
            using (OleDbCommand cmd = new OleDbCommand("select * from code;", conn))
            {
                cmd.ExecuteReader();
                cmd.Cancel();

                OleDbCommand cmd_clone = cmd.Clone();
                Assert.AreEqual(cmd.ToString(), cmd_clone.ToString());
            }
        }
All Usage Examples Of System.Data.OleDb.OleDbCommand::Clone