|
Browse by Tags
All Tags » c# ( RSS)
-
|
Ever wanted to build native .NET objects to use while in a PowerShell script? Well I certainly have, and finally took the time to figure out how easy it is to actually do! Enjoy! function Compile-Code { param ( [string[]] $code = $(throw "The parameter...
|
-
|
I don't know about anyone else, but I found it annoying to have to put on three-lines of code (or one ugly one-line of code) for an IF statement for argument validation. Mostly, I want to check a simple condition and if true, throw an exception. Well...
|
-
|
I will find many, many uses for this ... maybe someone else will too! using System; using System.Diagnostics; internal static class StringExtensions { public static T ToEnum<T>( this string value) where T : struct { Debug .Assert(! string .IsNullOrEmpty...
|
-
|
using System; using System.Configuration; using System.Data; using System.Data.SqlClient; using System.Globalization; using System.IO; using System.Web; using System.Web.UI; using System.Web.UI.HtmlControls; public class SqlViewStatePage : Page { private...
|
-
|
A while ago, several colleges of mine were having a terrible time with the loading times of some pages of their web application. Come to find out, they were suffering from ViewState bloat. ViewState was something I always tried to stay away from in the...
|
More Posts
|
|
|