Quantcast
Channel: Tips and Tricks – .NET Code Geeks
Browsing all 16 articles
Browse latest View live

Refactor “if” statements – functional programming style

Have you ever seen code that look like this: public string GetStatusDescription(Model model) { if(model.HasProblemReports) { return "Errors"; } if(model.SystemState.WorkingMode ==...

View Article



Enabling parameterized tests in MSTest using PostSharp

I have blogged about the shortcoming of Microsoft’s unit testing framework in the past. It has very good Visual Studio (and TYFS) integration out of the box but it seems that in order to use it I have...

View Article

Supercharge Isolate.Verify

At work we use Typemock Isolator for all of our Isolation/Mocking needs. Lately I’ve noticed that my co-workers do not like to use verify. One of the reasons they prefer not to use it is that sometime...

View Article

Fixing The process cannot access the file because it is being used by another...

I had some “Weird” things happening with IIS on one of my developer machines. After trouble shooting for a while I decided that was definitely not winning and removed all features from my pc that were...

View Article

What is new in RavenDB 3.5. Exploring data in the dark

One of the things that tend to happen a lot when we are developing with a database is that we need to peek at the data, and a lot of the time, just looking at the data one document at a time isn’t good...

View Article


HTML Cleaner – (not only) Word to clean HTML

A great on-line way to cleanup html (from for instance style information) before publishing it on your blog: HTML Cleaner – Word to clean HTML. One of the things is does is Remove inline styles. Ideal...

View Article

Concerned about your privacy in Windows 10?

Concerned about your privacy in Windows 10? Many articles have been written that Windows 10 sends information to Microsoft servers in background. While I do not have information on what kind of...

View Article

.NET enable and disable Fusion log to investigate assembly loading issues

Had to investigate some Assembly Loading issues, so I wrote two batch files to enable and disable the .NET Fusion Log: reg add "HKLM\Software\Microsoft\Fusion" /v EnableLog /t REG_DWORD /d 0 /f...

View Article


MSDN Dive – WPF documentation

Let’s go on with the WPF documentation this week. There are some interesting documents that can help you to understand how the WPF works and how you can gain more performance in your applications, once...

View Article


Batch file to open a specific TCP port in Windows 7 / 2008 Server and up

Thanks to the answer by Kevin Richardson on How to open ports on Windows firewall through batch file, I wrote this batch file that uses the add command of the Netsh AdvFirewall Firewall Commands which...

View Article

Unless you write an installer with the right manifest don’t include...

I’ve seen this question coming up a few times, and bumped into this at a client recently: the UAC dialog coming up when debugging a 32-bit executable. This is caused (more details below) by Installer...

View Article

jq error – Cannot iterate over null (null)

I’ve been playing around with the jq library again over the past couple of days to convert the JSON from the Stack Overflow API into CSV and found myself needing to deal with an optional field. I’ve...

View Article

C# Settings reminder

As a reminder to self: Settings are nice (too bad they advertise them as Windows Forms Application Settings, as they are just as useful for other assemblies), but be aware… When using Settings.Default,...

View Article


Did you know that Visual Studio shows deadlocked tasks?

I didn’t… And it’s not a new feature – since it existed since freaking Visual Studio 2010! Yesterday during an unrelated meeting Alon Fliess showed a bunch of us developers how Visual Studio detects...

View Article

Hack the Remote Desktop .RDP file

Glad I found out about the string to add to a .RDP file to make it connect to the administrative console whenever your remote supports that:   connect to console:i:1 Reference: Hack the Remote Desktop...

View Article


Compare Registry Settings – Beyond Compare

I think that Compare Registry Settings is one of the most unknown features of Beyond Compare. So if you are a Windows that fights with the Registry every now and then, this feature is for you. Note it...

View Article
Browsing all 16 articles
Browse latest View live




Latest Images