3 ms·
Whatever it takes to make things work! =) I guess stdarg.h like functionality would have been good for C#. Maybe some clean code purist argued against it becau
by rightbyte 5y ago
Whatever it takes to make things work! =)
I guess stdarg.h like functionality would have been good for C#. Maybe some clean code purist argued against it because it is bad practice or something.
- jve 5y agoDo you mean passing params as an array? It does exist in C# https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/params https://docs.microsoft.com/en-us/dotnet/csharp/language-refe...
- Joker_vD 5y agoThere is, it's called "params" [0], and it has been there since C# 1.0. But the link is about the Excel's interop, and that thing originally dates back to, I don't know, 1993 or somewhen around that time? It never was dropped/redesigned due to backward compatibility, so the latter improvements were simply bolted on top of it. [0] https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/params https://docs.microsoft.com/en-us/dotnet/csharp/language-refe...
- rightbyte 5y agoOh didn't know that. And here I am trying to be smug. Seems to only take the same type though? However in this case it would work since they are all Object.
- max002 5y ago20 args function? I could be that purist in here :) idk what to say apart of hahahahahahahahahaha... Well, another gem from microshit :D
- cm2187 5y agoThat’s not C#, this is the Excel COM API reference. Param arrays exist in VBA, but I don’t know if they do for COM.