Exception Handling C# with Example



Exception Handling C# with Example

 	using System;

	namespace CSharpExceptionHandling
	{
		class ExceptionBasics
		{
			static void Main(String[] arg)
			{
				int x=10, y=0;
				try
				{
					x /= y;
					Console.WriteLine("X: " + x);
				}
				catch
				{
					Console.WriteLine("Don't worry, I am handling the Exception.");
				}
			}
		}
	}
 

0 Comment's

Comment Form

Submit Comment