s*******k 发帖数: 20 | 1 In c#, what type of params should I use
when the purpose is to pass values
out of the method?
out? or ref?
Pros and cons respectively using the modifiers?
Thanks. |
d*r 发帖数: 238 | 2
out - single direction
ref - both direction
【在 s*******k 的大作中提到】 : In c#, what type of params should I use : when the purpose is to pass values : out of the method? : out? or ref? : Pros and cons respectively using the modifiers? : Thanks.
|
s*******k 发帖数: 20 | 3 hehe, thanks 大米
That means they behave the same as outbound params, right?
大米, how long have you been on C#? if u don't mind.
【在 d*r 的大作中提到】 : : out - single direction : ref - both direction
|
k****i 发帖数: 1072 | 4 out var doesn't need to be initialized in the caller but ref var does
【在 s*******k 的大作中提到】 : In c#, what type of params should I use : when the purpose is to pass values : out of the method? : out? or ref? : Pros and cons respectively using the modifiers? : Thanks.
|
s*******k 发帖数: 20 | 5 Thanks kongzi.
【在 k****i 的大作中提到】 : out var doesn't need to be initialized in the caller but ref var does
|