This project has moved and is read-only. For the latest updates, please go here.

Question: My programming language does not support properties with parameters ?
 

Answer:

NetOffice change all parametrized properties to methods. Use parametrized properties just in the same way as before with the Interop Assemblies or VBA. C# developers doesnt have to use the ugly “get_” or “set” overloads in NetOffice. The “get_” and “set"_” overloads exists in NetOffice too but hidden in Intellisense as compatibility workarround to make it easier moving an interop assembly solution to NetOffice.


Question
: My programming language does not support optional parameters ? 

Answer
:

NetOffice doesnt use optional parameters and goes a different way with additional overloads depending on the count of optional parameters. As example for a property with 2 optional parameters NetOffice spend 3 overloads for the property.


Question
: Do I have access to the native COM Proxies ?

Answer:

Yes, every object implements the property UnderlyingObject. be carefull here!


Question
: I work with Office versions in different languages on different systems. How can I change the ThreadCulture?

Answer
:

Change the culture at your will: NetOffice.Settings.ThreadCulture The default is "en-us".

Last edited May 7, 2012 at 11:10 AM by SebastianDotNet, version 30

Comments

themightylc Nov 25, 2013 at 8:52 PM 
"NetOffice doesnt use optional parameters and goes a different way with additional overloads depending on the count of optional parameters. As example for a property with 2 optional parameters NetOffice spend 3 overloads for the property. "

I do not understand this. I look at
WordApi.ContentControl.SetPlaceholderText()
in VB.NET. There are 4 Overloads. 0,1,2 and 3 parameters.
How can I only pass the String, ie. the third optional parameter to this method?
I cannot omit them because they are not defined as optional. Using Type.Missing gives an invalid cast exception. Using "empty" BuildingBlock and Range as the first parameters does not work either.