Skip to content

Implement ICloneable on MySqlCommand #583

@ghd258

Description

@ghd258

public object Clone()
{
DataCommand cmd = new DataCommand();
if (m_DbCommand != null)
{
if (m_DbCommand is ICloneable)
{
cmd.m_DbCommand = ((ICloneable)m_DbCommand).Clone() as DbCommand;
}
else
{
throw new ApplicationException("A class that implements IClonable is expected.");
}
}
cmd.m_DatabaseName = m_DatabaseName;
return cmd;
}

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions