Friday, June 27, 2008

Class and Fields Re-visited

Reading

Re-read pages 13 through 25 of C# for Sharp Kids.

Code
  1. Create a new console application called Classes. Add a new class called Animal. (Project->Add Class..., then rename the file from Class1.cs to Animal.cs).
  2. Edit your Animal class to make it look like what you see on page 23.
  3. In your Main function of your Program.cs file, try to use your class as you see on page 24.
  4. Build and correct errors. Feel free to experiment.

No comments: