Archive for July, 2012

Delegate, Lambda and more … C# versions comparative

July 29, 2012

C# event handler delegate changed according to C# versions.

Here is a sample, based on UnhandledException event

in the beginning was

d.UnhandledException += new UnhandledExceptionEventHandler(d_UnhandledException);
//...

void d_UnhandledException(object sender, UnhandledExceptionEventArgs e)
{
  Console.WriteLine("Ouch!");
}

currently, lambda version is quicker to write and easier to understand

d.UnhandledException += (sender, e) => { Console.WriteLine("Ouch!"); };

ain’t it ? 😉

Maybe Visual Studio Intellisense helps you with old style form, and you have to write the full version manually (do you snippet ?).

In Initializing things in C# post I found a quick reference to event handler, anonymous type, lambda, object initialization, etc
with clearfull samples according to C# versions 1, 2 and 3.

Have a nice reading 😉

Technorati tags: CSharp, Lambda, Delegate
Advertisements

Virtualization: multi-cpu vs multi-core vs …

July 8, 2012

Another hint on vm performance, cpu settings, multi-cpu vs multi-core vs multi-cpu-core 😉

source: vSphere 4.1: Multicore Virtual CPUs

Virtualization performance best practices: VMware vSphere …

July 7, 2012

While I was looking for infos about vm settings (cpu multi core, multi cpu, …) I found this helpfull document “Performance Best Practices for VMware vSphere™ 5.0“.
Well it wasn’t very appropriate to my need, but it helped empowering my knowledge  🙂 because best practices are valid in variuos scenarios. 😉

source: Performance Best Practices for VMware vSphere™ 5.0

  • July 2012
    M T W T F S S
    « Jun   Aug »
     1
    2345678
    9101112131415
    16171819202122
    23242526272829
    3031  
  • .

    .Net Agile Antivirus Book C# Programming EntityFramework GTD Hyper-V LinQ MVVM Office Resharper SCRUM Security Sharepoint Silverlight SQLServer TFS ToDoList Unit Test VirtualBox Virtual PC Visual Studio VMware Windows7 WPF XeDotNet XML XPath