/
aprogrammer
/
dotnet-docs
Обзор
Документация
Войти
/
aprogrammer
/
dotnet-docs
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
samples/snippets/cpp/VS_Snippets_CLR/CodeTryCatchFinallyExample/CPP/source2.cpp
32 строки
584 B
Andy De George
Move snippets from samples repo to this repo (#17296)
03 мар 2020, 19:23
Не верифицирован
03 мар 2020, 19:23
dbbeda1
Код
Авторство
О чём код?
//<snippet3> using namespace System; ref class ArgumentOutOfRangeExample { public: static void Main() { array<int>^ array1 = {0, 0}; array<int>^ array2 = {0, 0}; try { Array::Copy(array1, array2, -1); } catch (ArgumentOutOfRangeException^ e) { Console::WriteLine("Error: {0}", e); throw; } finally { Console::WriteLine("This statement is always executed."); } } }; int main() { ArgumentOutOfRangeExample::Main(); } //</snippet3>