Category Archive: .Net

Jul 27

Resolved: The “Microsoft.CodeAnalysis.BuildTasks.Csc” task could not be loaded from the assembly

Resolved: The “Microsoft.CodeAnalysis.BuildTasks.Csc” task could not be loaded from the assembly I recently have been working on an ASP.Net application and at some point I started to get build errors that although they were not stopping the build and allowed me to continue with the application’s execution, they were starting to get quite annoying. This …

Continue reading »

Jul 25

How to: Get the Sum of the Values from List in C#.Net?

How to: Get the Sum of the Values from List in C#.Net? Currently I am working on a new project in which I need to calculate some statistics that involve some basic statistics which require the total amount. The easy way out is just to do a foreach statement and iterate through the list adding …

Continue reading »

Jul 25

.Net: Supported Console Colors

.Net: Supported Console Colors The days of writing applications that write to the console seem to be over for a while now. Notwithstanding, we find ourselves using the console from time to time to help us debug or quickly test application logic. In my case, I am currently using the console to monitor logging information …

Continue reading »

Jul 25

Pro Tools: Json

Pro Tools: Json I’ve recently started working on a small programming project on the site. It has been a while since I’ve done any programming, so seeing all the new technologies and cloud offerings I must confess I am as excited and fascinated as I am daunted by how much there is and how far …

Continue reading »

Jul 23

Pro Tip: Never use type double for money / financial applications

Pro Tip: Never use type double for money / financial applications When you are new into coding financial applications one of the mistakes people tend to do is using a data type that it’s precision / significant digits are not enough to properly represent numers. If you’ve taken some CS classes you know how decimals …

Continue reading »

Dec 16

How to: Improve the performance of the Entity Framework

After writing code using entity framework for sometime and seeing the code base continue to grow I realized the importance of coding with performance in mind. There are things that come to mind like eager loading, but that alone won’t do much as your application continues to grow. Below are some key best practices I …

Continue reading »

Dec 14

How to: Convert a string into an Enum in C#.Net

Recently I came across the need to convert a string stored in the database into an enumeration in our application. I wasn’t really excited about having to write a switch statement nor having to maintain that code. Fortunately there is a command in .Net that allows you to parse that string into any enumeration which …

Continue reading »

Dec 14

Enumeration: What are the different SharePoint permission levels and their enumeration values?

You can learn more about this here: http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spbasepermissions.aspx but basically below is the information you’re looking for obtained from the source code: namespace Microsoft.SharePoint {     // Summary:     //     Specifies the built-in permissions available in Windows SharePoint Services.     [Flags]     public enum SPBasePermissions     {     …

Continue reading »

Sep 27

How to: Enable anonymous access on SharePoint?

Sometimes you need to publish a site anyone should be able to see or maybe even add information to. In order to do this you need to have Anonymous access enabled on the site. One step many people miss is that anonymous access has to be enabled at the web application level otherwise it is …

Continue reading »

Sep 16

What character escape sequences are available in C#.Net?

C# defines the following character escape sequences: ‘ – single quote, needed for character literals ” – double quote, needed for string literals  – backslash  – Unicode character 0 a – Alert (character 7) b – Backspace (character 8) f – Form feed (character 12) n – New line (character 10) r – Carriage return (character 13) t – Horizontal tab (character 9) …

Continue reading »

Older posts «

Fetch more items