In standard Excel interop, this is enough to add a worksheet in C#:
```
var sheet = worksheets.Add(After: addAfterSheet);
```
However, in NetOffice, I have to do this:
```
var sheet = worksheets.Add(before: Type.Missing, after: addAfterSheet);
```
Is this by design? It's a bit of a shame, since one of the greatest improvement for Interop in C# lately was the ability to use named arguments instead of Type.Missing everywhere...
Comments: NetOffice supports optionals arguments but didnt support -so called- named arguments like "argName := argValue" NetOffice doesnt use optional arguments for compatibility reasons because optional arguments is not supported by all .net languages in any version. To level this problem NetOffice spend all possible method overloads. For your Worksheet=>Add example this means NetOffice API offers the following API: public object Add(object before); public object Add(object before, object after); public object Add(object before, object after, object count); public object Add(object before, object after, object count, object type); This means if you want to set the second "after" argument, you have to give the first "before" argument also. This call interface design was born in Year of 2009 btw. (My personal opinion is to change that with the next .Net version which is means to drop .Net 3.0 and below because C# didnt support optional arguments here) Sebastian
```
var sheet = worksheets.Add(After: addAfterSheet);
```
However, in NetOffice, I have to do this:
```
var sheet = worksheets.Add(before: Type.Missing, after: addAfterSheet);
```
Is this by design? It's a bit of a shame, since one of the greatest improvement for Interop in C# lately was the ability to use named arguments instead of Type.Missing everywhere...
Comments: NetOffice supports optionals arguments but didnt support -so called- named arguments like "argName := argValue" NetOffice doesnt use optional arguments for compatibility reasons because optional arguments is not supported by all .net languages in any version. To level this problem NetOffice spend all possible method overloads. For your Worksheet=>Add example this means NetOffice API offers the following API: public object Add(object before); public object Add(object before, object after); public object Add(object before, object after, object count); public object Add(object before, object after, object count, object type); This means if you want to set the second "after" argument, you have to give the first "before" argument also. This call interface design was born in Year of 2009 btw. (My personal opinion is to change that with the next .Net version which is means to drop .Net 3.0 and below because C# didnt support optional arguments here) Sebastian