I am new to object oriented prog in c#.So kindly bear me. I dont want to create object, if this.OrderCost() is more than 10000.00.How to drop this object. Is it correct to do validtion here. What is the best possible way.
public Bank(string bankCode, string bankName)
{
this.bankCode= bankCode;
this.bankName= bankName;
if (this.orderCost() > moneyInBankAccount)
{
MessageBox.Show("Order amount exceeds the money in bank account.");
this. = null; // <--what to do here.
}
}