using System;
using System.Collections.Generic;
using System.Text;
namespace Bank
{
public class Overdraft : Account
{
double credit;
double inter = 0.15;
public double Credit
{
get { return credit; }
}
public Overdraft()
{
}
public Overdraft(String acno, String nam, double amt, double cred)
: base(acno, nam, amt)
{
this.credit = cred;
}
public override bool deposit(double amount)
{
amt += amount;
return true;
}
public override bool withdraw(double amount)
{
if (amount <= (credit + amt))
{
amt -= amount;
if (amt < 0)
{
credit -= Math.Abs(amt);
due = Math.Abs(amt);
interest();
}
return true;
}
else
Console.WriteLine("\n!!!!Credit Limit Crossed!!!!");
return false;
}
public void interest()
{
due = due * inter;
Console.WriteLine("The Interest for due amount is Rs. {0}", due);
return true;
}
public override string ToString()
{
return string.Format("Account Details: \nACC NO = {0} \nName = {1} \nBalance = Rs. {2}\nCredit =Rs. {3} \n", accno, name, amt, credit);
}
}
}
The above is one of the class in dll of my code. The question is how should i pass those Console.Writeln statements in Windows Forms and also ToString method. Or anyone can tell me how to get those statement in forms in a messagebox.