.net

  • Left in C#

    The C# way, using substring: After adding a reference in your project to “Microsoft.Visualbasic” under NET tab: See reference below if you’d alternatively like to save a few keystrokes and create your own generic re-usable function called “Left” in C#… Continue reading

  • Impersonation with Network Credentials in C# .Net

    (Mostly) unmodified code, courtesy of Phil Harding (see references below for original post). References http://platinumdogs.wordpress.com/2008/10/30/net-c-impersonation-with-network-credentials/ Continue reading

  • Logon failure: unknown username or bad password

    The following error occurred on an application deployed to a Server 2008 machine which was not part of the domain, but on the same network. The application needed to query to domain controller for permissions related to the users browsing… Continue reading

  • Change WPF Toolbar and Window Skin

    Took me some Googling to come across some good links to help me find exactly what I was looking to do. Hopefully my post gets enough hits that you’ll come across my title sooner rather than later, and can benefit… Continue reading

  • C# and VB Equivalents

    VB: C#: Continue reading

  • Check If Active Directory User is in Group C# ASP .Net

    When searching initially for the above (title of my blog ^), I initially found no good apparent solutions. It was off to the drawing board! LDAP – lightweight directory access protocol. Defines a syntax and tools for querying and enumerating… Continue reading

  • IIF in C#

    I always find myself referencing my other projects for this one when I jump between languages, so decided to toss it on the web. Both examples are in the context of ASP .Net, but syntax also applies np to Winforms… Continue reading

  • Serialize and Deserialize classes and objects in .Net

    Serialization is a powerful tool and a major factor in many intermediate development technologies such as webservices. Simply call “SerializeObject” and pass in the class name of your object for the “T” parameters, and your object will be serialized as… Continue reading

  • Play Sound in .Net

    Snippets below have been condensed from their original sources for brevity. See references for original articles. All examples are in C# .Net. Winforms: ASP .Net: (create an empty div in your page called “sound_element”) Note there are many ways to… Continue reading