What Will Be The Output Of The Following C Codep Pre Langcsharp #478

What will be the output of the following C# code?</p> <pre><code class="language-csharp" line="1"> class number { private int num1 = 60; private int num2 = 20; public int anumber { get { return num1; } set { num1 = value; } } public int anumber1 { get { return num2; } set { num2 = value; } } } class Program { public static void Main(string[] args) { number p = new number(); number k = new number(); int m = p.anumber; int t = k.anumber1; int r = p.anumber * k.anumber1; Console.WriteLine("sum = " + r); Console.ReadLine(); } } </code></pre>

Online Quiz This multiple choice question (MCQ) is related to the book/course gs gs108 CSharp. It can also be found in gs gs108 Indexers and Exception Handling - Properties and its Applications - Quiz No.1.


Similar question(s) are as followings:



Online Quizzes of gs108 CSharp

Choose an organization

Theme Customizer

Gaussian Texture



Gradient Background