logo

Crowdly

Practical C#/.Net

Шукаєте відповіді та рішення тестів для Practical C#/.Net? Перегляньте нашу велику колекцію перевірених відповідей для Practical C#/.Net в softserve.academy.

Отримайте миттєвий доступ до точних відповідей та детальних пояснень для питань вашого курсу. Наша платформа, створена спільнотою, допомагає студентам досягати успіху!

Please, select the output of the code below:

public class PowersOf2     {         static void Main()         {             foreach (int i in Power(2, 5))             {                 Console.Write("{0} ", i);             }         }          public static IEnumerable<int> Power(int number, int exponent)         {             int result = 1;              for (int i = 0; i < exponent; i++)             {                 result = result * number;                 yield return result;             }         }     }

Переглянути це питання

Please, choose the type that can be used as a return type in the declaration of an iterator with yield:

Переглянути це питання

Please, choose the members of the IEnumerator<T> interface:

Переглянути це питання

Please, choose what is true about IEnumerable<T> interface:

Переглянути це питання

Please, choose what will be the result of the execution of the code below:

interface A     {         void Hello();     }      interface B     {         void Hello();     }      class Test : A, B     {         public void Hello()         {             Console.WriteLine("Hello to all");         }     }     static void Main()     {         Test myTest = new Test();         myTest.Hello();     }

Переглянути це питання

Please, fill in the gaps. This is the class whose values can be ordered or sorted.

 public class Temperature : <Temperature>

    {

        public int (Temperature other)

        {

            if (other == null) return 1;

            return m_value.CompareTo(other.m_value);

        }

        protected double m_value = 0.0;

        public double Celsius

        {

            get

            {

                return m_value - 273.15;

            }

        }

        public double Kelvin

        {

            get

            {

                return m_value;

            }

            set

            {

                if (value < 0.0)

                {

                    throw new ArgumentException("Temperature cannot be less than absolute zero.");

                }

                else

                {

                    m_value = value;

                }

            }

        }

        public Temperature(double kelvins)

        {

            this.Kelvin = kelvins;

        }

    }
Переглянути це питання

For the code snippet shown below, which of the following statements are valid?

Переглянути це питання

Please, choose what will be the result of the execution of the code below:

interface A     {         void Hello();     }      interface B     {         void Hello();     }      class Test : A, B     {         void A.Hello()         {             Console.WriteLine("Hello from A");         }         void B.Hello()         {             Console.WriteLine("Hello from B");         }     }     static void Main()     {         Test myTest = new Test();         ((A)myTest).Hello();     }

Переглянути це питання

What are the valid constraints on type parameters for

C# generic classes?

0%
Переглянути це питання

Please, choose what is true about interfaces:

0%
0%
Переглянути це питання

Хочете миттєвий доступ до всіх перевірених відповідей на softserve.academy?

Отримайте необмежений доступ до відповідей на екзаменаційні питання - встановіть розширення Crowdly зараз!