A very simple question really and I expect an answer of 'circumstance dictates'. I was wondering however what people's thoughts are on passing parameters to a constructor or a method.
I'll try and set a context for my question:
public interface ICopier
{
void Copy();
}
public class FileCopier : ICopier
{
String m_source;
String m_destiniation;
FileCopier(String source_, String destination_)
{
m_source = source_;
m_destiniation = destiniation_;
}
public void Copy()
{
File.Copy(m_source, m_destiniation, true);
}
}
Or should FileCopier.Copy() accept source_ and destination_ as method parameters?
I want to keep these classes as abstract as possible.
I'm asking this question as I now have other interfaces/classes for Deleting, Renaming and so on, and I want to create a standard for doing this.
Thanks!