Back to notes -- Keyboard shortcut: 'u'  previous -- Keyboard shortcut: 'p'  next -- Keyboard shortcut: 'n'  Slide program -- Keyboard shortcut: 't'    A client of class BankAccount with an object initializer.Lecture 5 - slide 10 : 29
Program 5
using System;

public class Client {

  public static void Main(){
    BankAccount ba1 = new BankAccount{Owner = "James", Balance = 250},   
                ba2 = new BankAccount("Bill"){Balance = 1200};           
                                                                         

    Console.WriteLine(ba1);
    Console.WriteLine(ba2);
  }

}
 
 
 
 
 
BankAccounts initialized, in
part, via setters in properties:
Object initializers.