Wednesday, December 31, 2008

C# is so much easier then C++

I have been given the opportunity to work on an old c++ program for work this last couple works.  I just have to say that C# is so much easier to follow and understand then MFC any day of the week.  I did learn how to check if a directory exists before creating it though.

 1569 if(GetFileAttributes(_T(tPath)) == INVALID_FILE_ATTRIBUTES)
 1570     {
 1571         SECURITY_ATTRIBUTES sa;
 1572         sa.nLength = sizeof(SECURITY_ATTRIBUTES);        
 1573         sa.lpSecurityDescriptor = NULL;
 1574         sa.bInheritHandle = FALSE;
 1575         CreateDirectory(_T(tPath),&sa);
 1576     }

Just thought I put this here for when I need it again.

No comments: