大家帮我看看什么地方出错啦
using System;
using System.IO;
class usingDirInfo
{
static void Main( string[]args)
{
Console.Write("请输入目录名称:");
string strDirectoryName=Console.ReadLine();
usingDirInfo myusingDirInfo=new usingDirInfo();
DirectoryInfo myDirectoryInfo=new DirectoryInfo(strDirectoryNmae);
myusingDirInfo.showDirectory(myDirectoryInfo);
myusingDirInfo.showFiles(myDirectoryInfo);
Console.Read();
}
private void showDirectory(DirectoryInfo dir)
{
Console.WriteLine("以下为"+dir.Name+"所有子目录名称:");
DirectoryInfo[]myDirectoryInfo=dir.GetDirectories();
foreach(DirectoryInfo subDir in mydirectoryInfo)
{
Console.Writeline();
{SubDir.Name+"\n"+
"[最后修改日期;"+dir.LastAuessTime+"]\n"+
"[最后写入日期;"+dir.LastWriteTime+"]\n"
};
}
}
private void showFiles(DirectoryInfo dir)
{
Console.WriteLine("以下为"+dir.Name+"所有文件名称:");
FileInfo[]myFileInfo=dir.GetFiles();
foreach(FileInfo myFile in myFileInfo)
{
Console.Writeline();
{ myFile.Name+"\n"+
"[文件扩展名:"+myFile.Extension+"]\n"+
"[最后修改日期:"+myFile.LastAuessTime+"]\n"+
"[最后写入日期:"+myFile.LastWriteTime+"]\n"
};
}
}
}