Post Profile

Could not find a part of the path while doing a File Copy

If at all possible, never give your code the opportunity to fail. If there's any possibility at all that you can prevent an error condition from being raised, do it. try{ if (!string.IsNullOrEmpty(FileName)) { string newPath = System.IO.Path.Combine(FilePath,...
read more


Related Posts

Blank DVD needs formatting error when trying to burn data

Technology :

Find out why some blank DVDs need formatting apparently when you are trying to burn data on them even though they are not rewritable or recordable discs. I bought a new batch of blank regular DVDs today as I wanted to burn videos an...

Crystal Reports: Fix for "Load report failed" error.

Programming / Windows Development : CodeProject

The problem: You want to display a Crystal Reports file programmatically on your website. When you try to open the report -- say, by calling the Load(Path) method of a ReportDocument object -- your code throws an exception with the ...

Comparing String.IsNullOrWhiteSpace and String.IsNullOrEmpty

Programming / Windows Development : CodeProject

Comparing String.IsNullOrWhiteSpace and String.IsNullOrEmpty

How to Toggle String Case in .NET

Programming / Windows Development : CodeProject

A whole lot less code and a lot easier to do.public static string ToggleCase(this string str){ if (string.IsNullOrEmpty(str)) return str; return string.Join("", (from i in str select (char.IsLetter(i) ?...

Updating a file in database

Programming / Windows Development : CodeProject

I am trying to update, but i get the error: Incorrect syntax near ','.My code look like this:public void UpdateAnyFileToFileTable(string filePath) { string filename = Path.GetFileName(filePath); int id = file.GetUserID(); string...


Copyright © 2015 Regator, LLC