I am trying to create an interface of the FileStream.Open method. I have started but have got a little confused:
public interface IFileDataSource
{
FileStream Open(string path,
FileMode mode,
FileAccess access,
FileShare share);
}
Do I need to wrap this is another class to be able to use this interface?
You don’t need to “wrap” it – but you do need to implement it in order to use it. Presumably you’d write a simple implementation which just delegates to
File.Open: