C# Articles

C#: Generate a quick DataTable from a string array of column names

If you need to create a quick empty DataTable, check out this function.

0 Comments   Posted by retroman80s on Mar 25, 2011   1284 Views  


C#: ERROR: Default parameter value for 'RequestDateTime' must be a compile-time constant

One of the new feature of C# on .NET 4.0 is having the ability to create functions with optional parameters. If you get the following error: Default parameter value for 'RequestDateTime' must be a compile-time constant when trying to assign a default value of DateTime.Now. Here is a solution for resolving this error.

0 Comments   Posted by LazyAssCoder on Jan 18, 2011   2907 Views  


C#: NHibernate: Sorting Session.CreateSQLQuery(sqlQuery).List() result using lambda

This article will show you hot to sort the result from an NH interrogation

0 Comments   Posted by n3rd on Apr 13, 2009   6739 Views  


C#: Shortcut: Use the @ Symbol instead of escaping slashes

We all had to at one point or another modify a file path and escape the slashes before pasting it into our code or into a database table. Using the @ symbol in front of the string will eliminate the need to modify the path.

0 Comments   Posted by LazyAssCoder on Jan 29, 2008   988 Views  


C#: How To: Split a delimited string

This article shows how to split a delimited string into an array

0 Comments   Posted by LazyAssCoder on May 15, 2007   741 Views  


C#: Error: A constant value is expected

A constant value is expected when using a switch statement in c#

0 Comments   Posted by LazyAssCoder on Apr 24, 2007   7424 Views  


C#: How To: Return X number of rows from a DataView (ASP.NET 2.0)

One way to return X number of rows from a DataView

0 Comments   Posted by LazyAssCoder on Apr 17, 2007   714 Views  


C#: Error: Invalid URI: The Uri scheme is too long.

Invalid URI: The Uri scheme is too long.

0 Comments   Posted by LazyAssCoder on Apr 12, 2007   7440 Views  


C#: Shortcut: Coalesce Operator in C#

Coalesce Operator(??) in C#

0 Comments   Posted by LazyAssCoder on Mar 17, 2007   1122 Views  


C#: How To: Calculate a week starting monday

Calculate a week starting monday

0 Comments   Posted by LazyAssCoder on Mar 17, 2007   673 Views