.comment-link {margin-left:.6em;}

Saturday, February 12, 2005

 

another Point for VB against C#

 

this is another VB vs C# thing :

some people say : Given VBA's long history with Office, one might expect VB .NET to be the primary language among .NET developers using Office as a platform. But I've seen a lot of evidence that C# usage of Visual Studio Tools for Office (aka VSTO) is high.

so programming against Office is one of those places where VB has got it over C# hands-down

1- C# can’t bind to Word’s Close event and VB can

in C# we cannot have :

private void ThisDocument_CloseEvent()

{

}

while in VB we have :

Private Sub ThisDocument_CloseEvent() Handles Me.CloseEvent

End Sub

2- printing a word document , since VB Supports named Arguments , :

in VB : Doc.PrintOut(Copies := 2, Collate := true)

in C# :

object copies = 2;
object collate = true;
Doc.PrintOut(ref missing, ref missing, ref missing, ref missing,
ref missing, ref missing, ref missing, ref copies,
ref missing, ref missing, ref missing, ref collate,
ref missing, ref missing, ref missing, ref missing,
ref missing, ref missing);

 

 


Comments: Post a Comment



<< Home

This page is powered by Blogger. Isn't yours?