Yet another reason why C# is LAME

Posted Tue, Mar 28 2006 17:43 by bill
From an email list, a poster finally got some code to show an excel dialog to work. This is their code:
 
if(xlApp.Dialogs[Excel.XlBuiltInDialog.xlDialogOpen].Show(sTextName, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing)
 
In VB, that code is:

If xlApp.Dialogs(Excel.XlBuiltInDialog.xlDialogOpen).Show(sTextName) Then
 
C# sure does suck when it comes to working with Office or COM.
 
 
Filed under: ,

Comments

# @ Head : Yet another reason why C# is LAME

Wednesday, March 29, 2006 6:16 AM by guidmaster´s .NET blog

Tja – man må jo sige at Bill har lidt ret i at VB nok er “lidt” bedre i forbindelse...

# re: Yet another reason why C# is LAME

Wednesday, March 29, 2006 11:22 AM by Jason Bock

Then use VB when interacting with crappy COM servers that require this kind of "interaction".

Move along, nothing to see here...