using System;
using System.Web;

namespace BankLib
{
	public class Account
	{
		decimal _amount;
		
		public Account()
		{
		}

		public void MakeDeposit(decimal amount)
		{
			_amount += amount;
		}

		public void PrintBalance()
		{
			string msg;
			msg = "Your current balance is:" + _amount;
			
			//this code finds out if we're running
			//in the context of a Web request
			//in a Web request the ASP.NET framework
			//creates an HttpContext object that
			//is reachable through a static property
			//called Current.
			HttpContext ctx = HttpContext.Current;
			if (ctx != null)
				ctx.Response.Write(msg);
		}
	}
}
