actually i am using a code to check the directory but boolean always return false so i can't predict my logic kindly help me to fix this dear
bool isEmpty = false ;
isEmpty = !Directory.EnumerateFiles(voicefile + "\\").Any(); //check there is an folder
if (isEmpty)
{
foldernamevoice = objdirinfovikramgetfile + "" + getvoicefilesvikramfolder[0];
DirectoryInfo objdirinfovikramgetfilefolderfile = new DirectoryInfo(foldernamevoice);
if (objdirinfovikramgetfilefolderfile.Exists) //if folder exist
{
//get voice file name list
getvoicefilesvikram = objdirinfovikramgetfilefolderfile.GetFiles("*.*").Select(y => y.FullName + "#" + y.Name).Where(s => s.EndsWith(".dss") || s.EndsWith(".ds2") || s.EndsWith(".mp3") || s.EndsWith(".wav") || s.EndsWith(".dct") || s.EndsWith(".m4a") || s.EndsWith(".wma") || s.EndsWith(".DSS") || s.EndsWith(".DS2") || s.EndsWith(".MP3") || s.EndsWith(".WAV") || s.EndsWith(".DCT") || s.EndsWith(".M4A") || s.EndsWith(".WMA"));
folderfile = getvoicefilesvikramfolder[0];
}
}