c#
-
Create an Uninstall Shortcut for Windows Installer in C#
When utilizing the windows installer project type bundled with Visual Studio I was very surprised to find there was no simple functionality to add an uninstall shortcut. Instead, there are a few workarounds, some better than others but overall going… Continue reading
-
Access Denied on File Delete or Cannot delete file
If you receive an “access denied” message on your PC, whether in Windows or Linux, which occurs when trying to delete or modify a file, it can usually be narrowed down to a few reasons: – The file is marked… Continue reading
-
Change ReadOnly File Attribute in C#
Keep in mind when deleting files from code the typical override allowing users to delete anything in their path, whether it is marked readonly or not, will prevent your IO process from continuing and throw a nice little generic “access… Continue reading
-
Left in C#
The C# way, using substring: After adding a reference in your project to “Microsoft.Visualbasic” under NET tab: See reference below if you’d alternatively like to save a few keystrokes and create your own generic re-usable function called “Left” in C#… Continue reading
-
Impersonation with Network Credentials in C# .Net
(Mostly) unmodified code, courtesy of Phil Harding (see references below for original post). References http://platinumdogs.wordpress.com/2008/10/30/net-c-impersonation-with-network-credentials/ Continue reading
-
IIF in C#
I always find myself referencing my other projects for this one when I jump between languages, so decided to toss it on the web. Both examples are in the context of ASP .Net, but syntax also applies np to Winforms… Continue reading