|
Browse by Tags
All Tags » .net » 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...
|
More Posts
|
|
|