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;          
        }

No comments:

Post a Comment

Don't judge me like you know me.Don't talk to me if you don't like me. I am my own person and If you don't like that i don't give a f***