Tuesday, April 15, 2014

Best practice for "Get FOLDER Path in C#"

private static void ImagePath()
        {
            string binpath = AppDomain.CurrentDomain.BaseDirectory;
            string appPath = binpath.Replace("bin\\Debug\\", string.Empty);
            ImageFolderPath = Path.Combine(appPath, @"PrintImage\PrintPage.bmp");
            //if (!Directory.Exists(fullpath)) return "";
            //else
            //return ImageFolderPath;          
        }