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

A recent security fix has been released for BlogEngine.Net.

See full details here.

This video shows who are the design team behind the most popular .NET language - C#. The team talk about a brief background of C# 4.0. What will be in there and where the language is going. Read the post here.

using XL = Microsoft.Office.Interop.Excel;

void CreateExcel()

{

string filename = @"C:\ExcelThroughCSharp.xls";

// create an instance of EXCEL application

XL.Application app = new XL.Application();

app.Visible = true;

app.DisplayAlerts = true;

// add workbook

XL.Workbook wb = app.Workbooks.Add(XL.XlWBATemplate.xlWBATWorksheet);

// the wb workbook already has 1 worksheet

// add second worksheet after the first one

wb.Worksheets.Add(Type.Missing, wb.Worksheets[wb.Worksheets.Count], Type.Missing, Type.Missing);

// add second worksheet after the second one

wb.Worksheets.Add(Type.Missing, wb.Worksheets[wb.Worksheets.Count], Type.Missing, Type.Missing);

// get the second worksheet

XL.Worksheet sheet = (XL.Worksheet)wb.Worksheets[2];

// write some value

sheet.Cells[2, 2] = "test value from c# code";

// change worksheet's name

sheet.Name = "modified sheet";

// close and save the workbook

wb.Close(true, filename, null);

// release the worksheet resources

if (sheet != null)

{

System.Runtime.InteropServices.Marshal.ReleaseComObject(sheet);sheet = null;

}

// release the workbook resources

if (wb != null)

{

System.Runtime.InteropServices.Marshal.ReleaseComObject(wb);wb = null;

}

// release the excel instance resources

if (app != null)

{

app.Quit();

System.Runtime.InteropServices.Marshal.ReleaseComObject(app);

app = null;

}

// Clean up memory so Excel can shut down.

GC.Collect(); GC.WaitForPendingFinalizers();

// The GC needs to be called twice in order to get the

// Finalizers called - the first time in, it simply makes

// a list of what is to be finalized, the second time in,

// it actually the finalizing. Only then will the

// object do its automatic ReleaseComObject.

GC.Collect();GC.WaitForPendingFinalizers();

}

CREDITS: http://bytes.com/forum/thread475347.html

It would be worth checking the new release from Microsoft Research called PEX if you are tired of old school way of writing unit tests.  

Pex (Program EXploration) is an intelligent assistant to the programmer. From a parameterized unit test, it automatically produces a traditional unit test suite with high code coverage. In addition, it suggests to the programmer how to fix the bugs.

Explore what PEX can offer here.

The long wait is over. The BlogEngine.NET team released the version 1.4 of the popular .NET based blog engine on the planet.

Some of the new cool features of BE.NET 1.4 includes:

  1. New database provider
  2. Drag 'n drop widgets
  3. Extension settings
  4. Web 3.0 improvements
  5. Author Profiles
  6. Tag selector when adding new posts
  7. Subcategories
  8. Password encryption
  9. Improved live comment preview
  10. Hierarchical pages in the control panel
  11. Smarter comment spam protection
  12. Link collection widget
  13. Various performance improvements
  14. others...  

You can download the code here.

You can also watch the installation and upgrade screencast made by Al Nyveldt here and here.