Fellow Powershellers.
I want to build a custom function. My question is about parameters. I have read many of the online doco’s and examples. I see some that have Params with names and not defining type - which is fine by me. I see others that do not use params but just create the function wiht (item1, item2) etc.
Is there a preference?
Example 1 (with param)
function Insert_ExcelRows {
Param($results, $myWorkShet, $IN_AutoFit)
…
…
…
Thanks for that. I have tested it both ways with what I had in the original email and results appear to be the same. So, it is my interpretation that when you define a parameter wihtout indicating a datatype, it inherits that from the source. Is that correct?