.net
-
With Statement in C# .Net
If you’re stumbling across this article, chances are you may be looking for a replacement for VB .Net’s “with” statement. Sadly, there is no exact replacement, but there are alternatives which are equally helpful. Given a basic class “Robot” below:… Continue reading
-
Get Current Process ID in C# .Net
References MSDN (GetCurrentProcessID), http://msdn.microsoft.com/en-us/library/ms683180(v=vs.85).aspx MSDN (GetCurrentProcess), http://msdn.microsoft.com/en-us/library/system.diagnostics.process.getcurrentprocess.aspx Continue reading
-
AppActivate In C#
Note: This code was only tested on Windows 10. AppActivate, which many of you may recognize from VB activates a window for an application which is already running, bringing the window of that app to the foreground. In C#, there… Continue reading
-
Start a Process in the Foreground in C# .NET without AppActivate
In my particular scenario, I was using System.Diagnostics.Process to start another application, compiled separately, which communicated with the original app which launched the process and used Windows inter-process communication (IPC) to share information across applications using my own protocol. I… Continue reading
-
URL Rewriting/Mapping using Global.asax
Ultimately I wound up using a different method, specified in my other blog post on URL Rewriting on GoDaddy and Shared hosting. However, the method below is actually very useful if you are trying to do certain validation which cannot… Continue reading
-
URL Rewriting on GoDaddy and Shared hosting
After doing a lot of searching through google queries, forums and archives, I was finally able to solve the conundrum of using URL rewriting on GoDaddy. The site in question is also a subdomain in a sub folder off the… Continue reading
-
Simple URL ReWriting/Mapping in IIS7
There’s an easy alternative to other over-complicated solutions on the web if your mappings are simple/static and/or you have a spare grunt to quickly and easily keep them updated without having to write a line of code. In web.config add:… Continue reading
-
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