├── ExceptionHandling
├── Video.cs
├── App.config
├── Calculator.cs
├── YouTubeException.cs
├── Program.cs
├── YouTubeApi.cs
├── Properties
│ └── AssemblyInfo.cs
└── ExceptionHandling.csproj
├── ExceptionHandling.sln
├── .gitattributes
└── .gitignore
/ExceptionHandling/Video.cs:
--------------------------------------------------------------------------------
1 | namespace ExceptionHandling
2 | {
3 | public class Video
4 | {
5 | }
6 | }
--------------------------------------------------------------------------------
/ExceptionHandling/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/ExceptionHandling/Calculator.cs:
--------------------------------------------------------------------------------
1 | namespace ExceptionHandling
2 | {
3 | public class Calculator
4 | {
5 | public int Divide(int numerator, int denomenator)
6 | {
7 | return numerator / denomenator;
8 | }
9 | }
10 | }
--------------------------------------------------------------------------------
/ExceptionHandling/YouTubeException.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace ExceptionHandling
4 | {
5 | public class YouTubeException : Exception
6 | {
7 | public YouTubeException(string message, Exception innerException)
8 | : base(message, innerException)
9 | {
10 | }
11 | }
12 | }
--------------------------------------------------------------------------------
/ExceptionHandling/Program.cs:
--------------------------------------------------------------------------------
1 |
2 | using System;
3 | using System.Collections.Generic;
4 | using System.IO;
5 |
6 | namespace ExceptionHandling
7 | {
8 | class Program
9 | {
10 | static void Main(string[] args)
11 | {
12 | try
13 | {
14 | YouTubeApi api = new YouTubeApi();
15 | List