Category: C#

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

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 »

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 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 »

Jul 19

How to: Call a base constructor in C#.Net

Recently I decided I wanted to start creating children classes to handle my Exceptions, but I ran into the issue that I couldn’t quite call the base constructor and I kept asking myself why if I didn’t define a constructor the class couldn’t use the base class and automatically expose them. So below is kind …

Continue reading »