Please note, this is a STATIC archive of website www.tutorialspoint.com from 11 May 2019, cach3.com does not collect or store any user information, there is no "phishing" involved.
using System.IO;
using System;
using static System.Console;
namespace MicrosoftEs2
{
public BankAccount(string name, decimal initialBalance)
{
this.Owner = name;
this.Balance = initialBalance
this.Number = accountNumberSeed.ToString();
accountNumberSeed++;
}
public class BankAccount
{
public string Number{get;}
public string Owner{get; set;}
public decimal Balance{get;}
public void MakeDeposit(decimal amount, DateTime date, string note)
{
}
public void MakeWithdrawal(decimal amount, DateTime date, string note)
{
}
private static int accountNumberSeed = 1234567890;
}
class Program
{
static void Main(string[] args)
{
var account = new BankAccount("<name>", 1000);
Console.WriteLine($"Account {account.Number} was created for {account.Owner} with {account.Balance} initial balance.");
}
}
}
Advertisements
We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy.
AcceptLearn more