using System.IO;OpenFileDialog openFile = new OpenFileDialog();
if (openFile.ShowDialog() != DialogResult.OK)
return;
// get filename from OpenFileDialog
string fileName = openFile.FileName;
// get only filename without extension and path
string onlyname = Path.GetFileNameWithoutExtension(fileName);
// get extension of filename
string extension = Path.GetExtension(fileName);
// get directory of specific filename
string directory = Path.GetDirectoryName(fileName);
// change the extension of specific filename
string newFileName = Path.ChangeExtension(fileName, "bmp");
// get the root partition of specific file
string root = Path.GetPathRoot(fileName);




 
			
			
 
					
					
					
						 پاسخ با نقل قول
  پاسخ با نقل قول 
			