Skip to content

Instantly share code, notes, and snippets.

@benkoshy
Last active April 12, 2017 23:48
Show Gist options
  • Select an option

  • Save benkoshy/cd2ef7452cedb6acf2a054374a973294 to your computer and use it in GitHub Desktop.

Select an option

Save benkoshy/cd2ef7452cedb6acf2a054374a973294 to your computer and use it in GitHub Desktop.
Send messages, and don't worry about knowing how to access data - P1
    class Program
    {
        static void Main(string[] args)
        {
            Account freddie = new Account(5000000);

            // freddie buys a grand piano
            freddie.balance = freddie.balance - 500000m;

            // freddie buys a leather jacket
            freddie.balance = freddie.balance - 5000m;

            // freddie buys a beer in Singapore
            freddie.balance = freddie.balance - 20;            
        }                
    }


    public class Account
    {
        public decimal balance;

        public Account(decimal balance)
        {
            this.balance = balance;
        }
    }
    ```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment