Quantcast
Channel: NetOffice - MS Office in .NET
Viewing all articles
Browse latest Browse all 1741

Commented Unassigned: Named arguments do not work as expected (C#) [22313]

$
0
0
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: Ah, I understand. Thanks for your reply Sebastian!

Viewing all articles
Browse latest Browse all 1741

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>