Windows Phone Developers

Sunday, August 24, 2008

A new expression requires (), [], or {} after type (C# Excel Application)

The new operator, used to dynamically allocate memory for an object, was not specified correctly. (Compiler Error CS1526)

Replace

oXL = new Microsoft.Office.Interop.Excel.application;

with

oXL = new Microsoft.Office.Interop.Excel.application();

Digg Technorati Delicious StumbleUpon Reddit BlinkList Furl Mixx Facebook Google Bookmark Yahoo
ma.gnolia squidoo newsvine live netscape tailrank mister-wong blogmarks slashdot spurl StumbleUpon

2 comments:

  1. this doesn't work

    ReplyDelete
  2. Hi Can you post the code that throws the error?

    ReplyDelete