|
Rate question difficulty level
|
0
|
0 Votes
|
please review the following class:
public class Class1
{
public void funcRef(ref string param) { param = "text"; }
public void funcOut(out string x) { x = "text"; }
}
1. what is the difference between the 2 functions?
2. which of the following code won't compile:
A. Class1 c = new Class1(); string str = "some string"; c.funcRef(ref str);
B. Class1 c = new Class1(); string str = "some string"; c.funcOut(out str);
C. Class1 c = new Class1(); string str; c.funcRef(ref str);
D. Class1 c = new Class1(); string str; c.funcOut(out str);
Company: iForex
Location:
Israel
C#
Ref
Out
Now hiring!
---------------------------
---------------------------
---------------------------
---------------------------
---------------------------
---------------------------
---------------------------