【发布时间】:2013-06-28 03:32:53
【问题描述】:
只是一个简单的问题,
你认为两者哪个更好:
- A recursive function that returns a value
- A recursive function with an OUT paremeter (which will serve as a return value.)
我尝试了这两种方法,结果都一样。
请注意,此功能的主要功能是:
-> accept a String parameter.
-> scan through a list (whick have like 1032 items) and find a match of the string parameter above.
-> then get a specific data from the object that matched the string parameter.
您的意见将不胜感激。
【问题讨论】:
-
另请参阅:stackoverflow.com/questions/527953/… 作为旁注,我认为在 C# 中函数被称为方法,因为它是一种面向对象的语言。
标签: c# function recursion parameters out