palermo4 posted on February 16, 2010 09:25

I am testing the new optional parameters in C#.  I am also testing the my new Windows Live Writer plug-in for code snippets.

// Testing optional parameters in C# 4.0
public static void DisplayMessage(string message = "NO SOUP FOR YOU") 
{
    Console.WriteLine("{0}: {1}", DateTime.Now, message);
}

Now this is how to execute one way or another…

static void Main(string[] args)
{
    // calling with parameter
    DisplayMessage("Favorite comedy line...");
    
    // calling with named parameter
    DisplayMessage(message: "Drum roll...");
    
    // calling without parameter
    DisplayMessage();
}

Posted in: code  Tags:
palermo4 posted on January 7, 2010 03:04

If you ever forget your password and you are the administrator of a blogengine.net website, you will learn quickly that there is not a “reset password” option through the administration interface.  Rather, you will need to find the *original* roles.xml and users.xml files and replace your current ones on your site.  This will replace your user account with the default admin user with the password of “admin”.  Once you have logged in as the admin user, you can either change the default password or create a new account with admin role abilities.

blogengine_app_data


Posted in: code  Tags:

Speaker notes for WUX203 Session at Tech-Ed 2009 South Africa

It was great to finally deliver a presentation in 1024x768 resolution!  For those who attended this session, thanks for a great time.  I enjoyed my lap around the auditorium :-)

The code demos for this session can be downloaded below.  Cheers!


Posted in: code  Tags:

Speaker notes for WUX206 Session at Tech-Ed 2009 Africa

[Accelerators]

[Web Slices]

[Search Providers]

Download demonstration code:  [IE 8 Demos]


Posted in: code  Tags:
Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2010 J. Michael Palermo IV