C# List to string with delimiter

You can use String.Join. If you have a List<string> then you can call ToArray first: In .NET 4 you don’t need the ToArray anymore, since there is an overload of String.Join that takes an IEnumerable<string>. Results: John, Anna, Monica

“Could not find a part of the path” error message

The error is self explanatory. The path you are trying to access is not present. I’m sure that this is not the correct path. Debug folder directly in E: drive looks wrong to me. I guess there must be the project name folder directory present. Second thing; what is {0} in your string. I am sure that it is an argument … Read more

Regex that accepts only numbers (0-9) and NO characters

Your regex ^[0-9] matches anything beginning with a digit, including strings like “1A”. To avoid a partial match, append a $ to the end: This accepts any number of digits, including none. To accept one or more digits, change the * to +. To accept exactly one digit, just remove the *. UPDATE: You mixed up the arguments to IsMatch. The pattern should be the second argument, … Read more

A generic error occurred in GDI+, JPEG Image to MemoryStream

OK I seem to have found the cause just by sheer luck and its nothing wrong with that particular method, it’s further back up the call stack. Earlier I resize the image and as part of that method I return the resized object as follows. I have inserted two calls to the above method and … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)