Hacker News new | past | comments | ask | show | jobs | submit login

Why wouldn't the just use the params [0] keyword for stuff like this?

[0]: https://docs.microsoft.com/en-us/dotnet/csharp/language-refe...




Because this is an OLE 2.0 library for Office automation.


My humble guess is that it didn't exist when this was designed?


This looks like the interop libraries auto generated off the Office OLE Automation interfaces. SafeArrays should have existed back then. I imagine this was used instead for perceived developer friendliness vs forcing developers to box up and create a Safe Array to marshall in (more boilerplate).


Don't think it works in this case. In general why there are so many overloads in C# with parameters like arg0, arg1, arg2 and so on is because of the poor performance of the params solution for value types.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: