C#
Specify th ...
Site Language: English
Українська
English
Русский
Programming Tests
Login
Sign Up
Programming Tests
Theory
Snippets
Papers
Landing
Android
Prices
FAQ
Cosmo Story
Terms and Conditions
Privacy Policy
Cookies Policy
Send Feedback
Specify the correct order of catch sections when handling exceptions of different types.
From general to specific.
From the most probable to the least probable.
From specific to general.
From the least probable to the most probable.
Explanation
Get an explanation when it's available:
Subscribe
exceptions
Like
Login in
to like
Comment
Login in
to comment
Share
Tweet
Related Content
class Program { static void Main(string[] args) { try { int value = int.Parse("test exception"); } catch (Exception e) { throw e; // Здесь ли, по мнению CLR, расположено начало исключения? } } }
Укажите имя класса, от которого наследуются все исключения.
Что произойдет в результате выполнения следующего кода: class Test { static void Main(string[] args) { char[] vowels = {'a','e','i','o','u'}; for (int i = 1; i <= vowels.Length; i++) Console.Write(vowels[i] + " "); } }
Скомпилируется ли следующий код (как часть некоторого метода): string[] str = new string[5]; try { str[4] = "anything"; } catch (Exception e) { Console.WriteLine(e.Message); } catch (IndexOutOfRangeException e) { Console.WriteLine(e.Message); }
Будет ли компилироваться данный фрагмент кода? try { FileStream F = new FileStream("myfile.txt"); string s = F.ReadLine(); } catch (IOException) { } finally { F.Close(); }
C
#
Quiz
Login to learn C#
or
Read more about
C# Quizzes
Follow CodeGalaxy
Mobile Beta
Send Feedback
Keep exploring
C# quizzes
Лямбда-выражения на платформе .Net могут существовать в виде:
Скомпилируется ли данный фрагмент кода успешно? private int GetID (string inputText) { if (inputText != "") return 1; else if (inputText == "") return 0; }
Для чего предназначен метод Finalize?
Поддерживает ли С# перегрузку методов на основе возвращаемого значения?
public abstract class A { public virtual string Print() { return "A"; } } public class B : A { public override new string Print() { return "B"; } } public class C : B { public string Print() { return "C"; } } Каков будет результат при выполнении следующего кода: A ac = new C(); Console.WriteLine(ac.Print());
Укажите отличия интерфейса от абстрактного класса
Sign Up Now
or
Subscribe for future quizzes
Login in to like
Login in to comment