NamedArguments with VO Dialect

This forum is meant for questions and discussions about the X# language and tools
Post Reply
User avatar
pemo18
Posts: 81
Joined: Fri Apr 27, 2018 10:38 am
Location: Germany

NamedArguments with VO Dialect

Post by pemo18 »

Hello,

Are their any plans to provide named arguments for the VO dialect too?

I know there would be some kind of conflicts between different kinds of method call syntax.

It would be very convinient for Office Interop method calls.

Kind regards,
Peter

PS: There should be at least one example for named arguments in the X# help file.
User avatar
robert
Posts: 4520
Joined: Fri Aug 21, 2015 10:57 am
Location: Netherlands

NamedArguments with VO Dialect

Post by robert »

Peter,
Are you using strongly typed Office classes or OleAutoObject?
With the strongly typed classes you should be able to
( if you enable the 'Allow Named Arguments' option in the compiler options:)

Code: Select all

// when oDocument is a Word Document
oDocument:SaveAs2(FileName := "SomeFileName.Docx", EmbedTrueTypeFonts := TRUE)

Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
User avatar
pemo18
Posts: 81
Joined: Fri Apr 27, 2018 10:38 am
Location: Germany

NamedArguments with VO Dialect

Post by pemo18 »

Hi Robert,

Only a few seconds after I hit submit I found the compiler settings.

This is very good, thank you for that small improvement.

But there is no mentioning in the readme.rtf?

Regards,
Peter
Post Reply