Home > Net >  C # DirectoryInfo use
C # DirectoryInfo use

Time:11-28

Due to the use need, now need to obtain a path of hex file filename, I according to the following writing is always an error, a great god know help me answer the
Because of various reasons to use VS2008, c #

Array & lt; String ^ & gt; ^ HexName=gcnew: : cli: : array & lt; String ^ & gt; (20);
DirectoryInfo ^ di=gcnew DirectoryInfo (strHexDir);//strHexDir folder path for

For each (the FileInfo ^ file in di - & gt; GetFiles (*. "hex"))
{
HexName [0]=file - & gt; FullName;

}


The debug debugging, always run to DirectoryInfo ^ di=gcnew DirectoryInfo (strHexDir); Prompt the following error


Really don't know the reason why ~, have know expert help to give directions, thank you ~

CodePudding user response:

Path format is wrong, post your path

CodePudding user response:

This is a c #? C + +? Error path format is wrong,
  •  Tags:  
  • C#
  • Related