File Directory Visual C++ .NET

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