#include "stdafx.h"
using namespace System;
using namespace System::IO;
using namespace System::Text;
int main(array<System::String ^> ^args)
{
DirectoryInfo ^dir = gcnew DirectoryInfo("c:\\");
array<FileInfo^>^ files = dir->GetFiles();
if (files->Length == 0)
Console::WriteLine("\tNone.");
else
{
for each (FileInfo^ finfo in files)
{
Console::WriteLine("\t{0}", finfo->Name);
}
}
return 0;
}
|