46 .
What Will Be The Output Of The Following Code:
using System;
using System.Collections.Generic;
namespace TechBeamers
{
    public delegate void sampleDelegate(int num);
    public class testDelegate 
    {
     public void checkEven(int num) 
     {
      if(num%2 ==0) 
        Console.WriteLine("This number is an even number");
       else
        Console.WriteLine("This number is an odd number");
      }

      public void squareNumber(int num) 
      {
        Console.WriteLine("Square of this number is: {0}", num*num); 
      }
    }

    class sample 
    {
       public static void Main( ) 
       {
         testDelegate obj = new testDelegate();
         sampleDelegate delegateObj = new sampleDelegate(obj.checkEven);
         delegateObj += new sampleDelegate(obj.squareNumber);
         delegateObj(25);
        }
    }
}

A.Error
B. This number is an odd number
C. Square of this number is: 625
D.This number is an odd number Square of this number is: 625
View AnswerAns: This number is an odd number Square of this number is: 625
47 .
What Will Be The Output Of The Following Code:
using System;
using System.Collections.ObjectModel;
using System.Collections.Generic;
public class Program
    {
        public static void Main()
        {
            var arr = new List { 20, 40, 35, 85, 70 };
            var collection = new Collection(arr);
            arr.Add(60);
            arr.Sort();
            Console.WriteLine(String.Join(",", collection));
        }
    }

A.20, 40, 35, 85, 70
B. 20, 40, 35, 85, 70, 60
C. 20, 35, 40, 60, 70, 85
D.20, 35, 40, 60, 70
View AnswerAns: 20, 35, 40, 60, 70, 85
48 .
What Will Be The Output Of The Following Code:
using System;
public class Program
    {
        public static  void Main()
        {
            Nullable number = 0;
            int num = 1;
            Console.WriteLine(number.GetType() == num.GetType());
        }
    }

A.True
B. False
C. Null
D.Error
View AnswerAns: False
49 .
What Will Be The Output Of The Following Code:
using System;
using System.Collections.ObjectModel;
using System.Collections.Generic;
namespace TechBeamers
{
    delegate void A(ref string str);
    public class sample
    {
        public static void StringMarker(ref string a)
        {
            a = a.Substring(0, a.Length - 6);
        }
    }
    public class Program
    {
        public static void Main(string[] args)
        {
            A str1;
            string str = "Let's Learn CSharp";
            str1 = sample.StringMarker;
            str1(ref str);
            Console.WriteLine(str);
        }
    }
}

A.Learn CSharp
B. Let's Learn
C. Let's Learn CSharp
D.Null
View AnswerAns: Let's Learn
50 .
What Will Be The Output Of The Following Code:
using System;
public class Program
    {
        public static void Main(string[] args)
        {
            bool a = true;
            bool b = false;
            a ^= b;
            Console.WriteLine(a);
            Console.ReadLine();
        }
    }

A.True
B. False
C. Null
D.Error
View AnswerAns: True