1 / 37

Intro to C#

Intro to C#. Head First C#. Programming Coverage. Who is this book for?. Do you want to Learn C#? Do you like to tinker – do you learn by doing rather than by reading? Do you prefer stimulating dinner conversation to dry, dull academic lectures?

henry
Download Presentation

Intro to C#

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Intro to C#

  2. Head First C#

  3. Programming Coverage

  4. Who is this book for? • Do you want to Learn C#? • Do you like to tinker – do you learn by doing rather than by reading? • Do you prefer stimulating dinner conversation to dry, dull academic lectures? • Does the idea of writing code make you bored and a little twitchy? • Are you a kick-butt C++ or Java programmer looking for a reference book? • Are you afraid to try something different?

  5. Book’s Design • Brain craves novelty

  6. Head First Principles • Make it visual • Conversational, casual style instead of formal, lecture style • Challenge the learner to think • Get the learner’s attention • Uses unexpected images and techniques • Touch the learner’s emotions • Redundancy • Same topic presented multiple times in different ways for multiple learning styles • Different activities to learn and remember when doing, not just when reading

  7. Bend Your Brain Into Submission • Slow down. The more you understand the less you have to memorize. • Do the exercises. Write your own notes. • Read the “There are no Dumb Questions” sections. • Make this the last thing you read before bed, or the last challenging thing. • Drink lots of water.

  8. Bend Your Brain Into Submission • Talk about it. Out loud. • Listen to your brain. Pay attention when it feels overloaded or you find yourself skimming. • Feel something. Your brain needs to feel that it matters. • Write a lot of software!

  9. Activities and Exercises • The activities and exercises are part of the core content of the book. • They are not optional! • Ok to peek at the solutions in the book, but you should try to solve them first. • We will do some similar activities and exercises in class.

  10. C# Demonstration Walkthrough • Try this on your computer • Will introduce C#.NET and the Visual Studio IDE – Integrated Development Environment – which is a program used to write programs

  11. Contacts Database

  12. Structure of our Program

  13. Contacts Database • Start up Visual Studio, follow along book/lecture • Points to make: • IDE creates files for you from a template • Major windows of the IDE • Reset layout

  14. Contacts Database • Add picturebox to form • Insert logo graphic from http://www.headfirstlabs.com/books/hfcsharp/ • Will need to download and unzip the file

  15. Picturebox Click Event • Double-click on the picturebox to add an event. This is called a method. Type the code inside the curly braces: private void pictureBox1_Click(object sender, EventArgs e) { MessageBox.Show("Contact list 1.0.\nWritten by: Kenrick Mock", "About"); }

  16. Run your program • Where are my files? Click Green Triangle

  17. Next Steps • See book/lecture for details • Add database • Add “People” Table

  18. Who Does What?

  19. Complete The Table Also, type in sample data into the table (see in class)

  20. Connect Database • Add new database • Add new data source • Drag onto form • Click “Detail” for separate fields • Configure text/font/etc. • Test Drive • Skip installer, database diagram

  21. Intro to Computing (From C# Software Solutions)

  22. The CPU • Fetches instructions from main memory • Carries out the operations commanded by the instructions • Each instruction produces some outcome • A program is an entire sequence of instructions • Instructions are stored as binary numbers • Binary number - a sequence of 1’s and 0’s

  23. Main Memory – a big list of addresses

  24. The Fetch-Decode Execute Cycle

  25. Knowing About: Computer Hardware • Bit: smallest and most basic data item in a computer; represents a 0 or a 1 • Byte: a grouping of eight bits • E.g., 00010001 • What does this represent? • Word: a grouping of one or more bytes

  26. Bits could represent characters

  27. Bits could represent sound We said that 00010001 could represent anything, a number, sound, color, etc.

  28. Layers of Programming Languages

  29. Layers of Software Systems Applications Operating System BIOS CPU

  30. The .NET Platform • C# .NET is in a sense one step removed from a typical high-level language • C# runs using a “Virtual Machine” or “Common Language Runtime” • The physical computer simulates a virtual computer that runs your program .NET Software .NET Software .NET Program

  31. .NET Framework C# VB.NET C++.NET Other Visual Studio .NET Common Language Specification Framework Class Library ASP.NET Windows Forms Web Services Web Forms Controls Drawing ASP.NET Application Services Windows Application Services ADO.NET XML Threading IO Network Security Diagnostics Etc. Common Language Runtime Common Type System Lifecycle Monitoring Memory Management Operating System

More Related