I am making a program in C# with a lot of IO operations. Some of that operations are copying directories.

I was really stunned when I figured out that you don't have something like Directory.copy(SourceDir, DestinationDir) in C#.

I googled a little bit around and at msdn they give a code sample to copy directories. (http://msdn.microsoft.com/en-us/library/bb762914.aspx). But when you search a little bit further, there is a Directory.Copy method in the Microsoft.VisualBasic.FileIO namespace. (http://msdn.microsoft.com/en-us/library/ms127957.aspx)

I could refere to this namespace and use this method, but there must be a reason why Microsoft does not support this in C# and why they aren't mentioning it on msdn.

Hope somebody can tell me the reason.

I can write extensionmethod to solve this problem & I can solve it pretty easy, but my question is Why? Why is there no such method in C#, I just want to know :-)

Edit
Report