c# copy variable code example
Example 1: c# copy file
File.Copy(Path.Combine(sourceDir, fName), Path.Combine(distDir, fName));
Example 2: c# copy an object
class TestClass
{
public TestClass Copy()
{
return MemberwiseClone();
}
}