March 2016
Intermediate to advanced
550 pages
10h 57m
English
.NET has prebuilt class libraries containing hundreds of thousands of types. Rather than creating your own completely new types, you can often start by inheriting from one of Microsoft's.
In the Ch06_PacktLibrary project, add a new class named BankAccountException, as shown in the following code:
using System;
namespace Packt.CS6
{
public class BankAccountException : Exception
{
public BankAccountException() : base() { }
public BankAccountException(string message) : base(message) { }
public BankAccountException(string message, Exception innerException) : base(message, innerException) { }
}
}In the BankAccount class that you created in the previous chapter, add the following method: ...
Read now
Unlock full access