All pastes #245571 Raw Edit

Xodus

public text v1 · immutable
#245571 ·published 2006-11-11 03:26 UTC
rendered paste body
// FORM1.CS:

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace Lesson06
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button2_Click(object sender, EventArgs e)
        {

            Car myCar = new Car();
            myCar.Make = "Oldsmobile";
            myCar.Model = "Cutlas Supreme";
            myCar.ElapsedMileage = "200000";

            MessageBox.Show(myCar.Make);

        }
    }
}

// CAR.CS

using System;
using System.Collections.Generic;
using System.Text;

namespace Lesson06
{
    class Car
    {

        private string _make;
        private string _model;
        private string _elapsedMileage;



        public string Make
        {
                get { return _make; }
                set { _make = value; }
        }

        public string Model
        {
            get { return _model; }
            set { _model = value; }
        }

        public string ElapsedMileage
        {
            get { return _elapsedMileage; }
            set { _elapsedMileage = value; }
        }
    }
}