Tag: C#

The Journey to One .NET – Live

Wednesday, May 2012:00 PM – 12:30 PM EDT Scott Hanselman, Microsoft; Scott Hunter, Microsoft Demo: Created a Blazor WebAssembly app in VS You can check PWA. Showing local variables in the browser while debugging, which has only worked for a couple of months. Can debug the backend API in VS. Set breakpoints. This is full-stack …

Continue reading

Text Encoding Options for NLog

I’ve been using NLog for a while now and recently decided I wanted to have some of my log files written as Unicode text.  I learned that you can specify this in your <target> sections of NLog.config as follows:

Note that I only tested two different encodings, “Unicode” and “UTF-8”.  Also, “UTF-8” must have …

Continue reading

Unit Testing Private Static Methods in C#

I had never needed to unit test a private static class method in C# before, but it turns out that Microsoft created a special object type to handle just such a case. To test the private static method DetermineFilename (that takes filePath as a string parameter and returns a string) in the FileManager class, do …

Continue reading

Disable C# “var” Recommendation in ReSharper

I have been trying to use type names instead of “var” in my C# code lately.  However, ReSharper wants me to convert every type name in a declaration to “var”.  The squiggles under my type names were driving me nuts, so I decided to dig into the settings to turn this off. To disable these …

Continue reading