Author: Benjamin Perkins

Constants and Enums in C#

Benjamin Perkins C#

Constants come in handy when you need to store values that will be used frequently within the system and at the same time will not change often, if ever. You want to avoid hard coding values in you code. It makes maintenance and debugging very difficult. You can create a constants class and then access […]

Read More →

How to use Data Parallelism from the Task Parallel Library in C#

Benjamin Perkins C#

I wrote a program a few months back that populated a dropdown list with contents from a class using reflection. I used a normal for each statement. [sourcecode language=”csharp” padlinenumbers=”true” autolinks=”false” gutter=”false” toolbar=”false”] foreach (Type type in assembly.GetTypes() .OrderBy(f => f.MetadataToken)) { if (type.Namespace != null) { if (!type.Namespace.ToLower().StartsWith(“namespace”)) combobox1.Add(new ComboBoxClass(type.Name, type.FullName)); } } [/sourcecode] […]

Read More →

ERROR_INSUFFICIENT_ACCESS_TO_SITE_FOLDER

ASP.NET Benjamin Perkins

I was publishing an ASP.NET Core application, straight to production, which is a no-no, no-go and got this error, also seen in Figure 1. Figure 1, publishing to an Azure App Service, straight to production Severity    Code    Description Project File    Line    Suppression State Error       Web deployment task failed. (Unable to perform the operation (“Delete File”)  […]

Read More →

How to delete a Docker image

Benjamin Perkins Docker

I was able to remove some of my unwanted images by accessing my Docker Cloud account here.  As seen in Figure 1, navigate to your repositories, click on those dots, a delete popup is rendered. Figure 1, how to delete a docker image repository I write this because when I searched all I found was […]

Read More →

How do Margins in WPF work

Benjamin Perkins C#

When you add a control to your WPF container you typcally set the width and height to align it within the window and in relation to other controls. An alternative to this is to set the controls margin in relation to the container. This plays an important role when you want to add GridSplitters and […]

Read More →