1.

Which of the following statements will correctly copy the contents of one string into another ?

A. <pre><code class="csharp">String s1 = "String"; String s2; s2 = s1;</code></pre>
B. <pre><code class="csharp">String s1 = "String" ; String s2; s2 = String.Concat(s1, s2);</code></pre>
C. <pre><code class="csharp">String s1 = "String"; String s2; s2 = String.Copy(s1);</code></pre>
D. <pre><code class="csharp">String s1 = "String"; String s2; s2 = s1.Replace();</code></pre>
E. <pre><code class="csharp">String s1 = "String"; String s2; s2 = s2.StringCopy(s1);</code></pre>
Answer» D. <pre><code class="csharp">String s1 = "String"; String s2; s2 = s1.Replace();</code></pre>


Discussion

No Comment Found

Related MCQs