27 lines
518 B
C#
27 lines
518 B
C#
using System;
|
|
using System.IO;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Exceptionhandling
|
|
{
|
|
class Program
|
|
{
|
|
static void Main(string[] args)
|
|
{
|
|
|
|
try
|
|
{
|
|
var api = new YouTubeApi();
|
|
var videos = api.GetVideos("nisse");
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
Console.WriteLine("Sorry, an unexpected error occured. :" + ex.Message);
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|