Getting Started with C

Team-Fly    

 
.NET and COM Interoperability Handbook, The
By Alan Gordon
Table of Contents
Chapter Four.  A Quick Introduction to C#

Getting Started with C#

Assuming that you are an experienced programmer in some programming language you need a few key questions answered before you are ready to start programming in a new language. After you have the answers to these questions, learning the rest of the language is essentially just "filling in the gaps" and learning how to use the various libraries associated with the language. Here are the questions as I see them:

  • How do I create a simple "hello world" application in the language? A "hello world" application shows you how to structure a simple program, how to do I/O, and how to use the standard libraries provided by the language. It also shows you how to create the entry point for an application.

  • How do I compile, link, and run an application written in the programming language, including how to link with both standard and third-party libraries.

  • What is the basic set of operators that are available in the language, including assignment, test for equality, comparison (less than, greater than, and so forth), and mathematical operations.

  • What is the basic set of primitive types available in the language?

  • How do I create and manipulate a string in the language?

  • How do I create and use arrays in the language?

  • How do I declare classes? This includes how to declare static and nonstatic members of a class and how to assign accessibility (private, public, protected, and so forth) to the members of a class.

  • How do I declare and use instances of a class? What operator or method is used to create a new instance of a class? Are both stack and heap-resident instances supported? and how do I create instances of each type? What operator is used to call methods and properties on an instance of class?

  • How do I use inheritance? and how to I override a function in a subclass? Also, how do I call the base class implementation of a method in my override?

  • What are the available flow-of-control constructs? How do you use the standard if, elseif, and else constructs as well as switch statements, that is, selecting one possibility from among many based on a condition and iteration statements such as for, while, and do loops ?

  • How do I implement exception handling?

If an experienced developer knows the answers to these questions about a language, they are ready to start programming in the language, and they can gradually learn the rest that they need to knowthe nuances , gotchas, and idioms of the languagein time.


Team-Fly    
Top
 


. Net and COM Interoperability Handbook
The .NET and COM Interoperability Handbook (Integrated .Net)
ISBN: 013046130X
EAN: 2147483647
Year: 2002
Pages: 119
Authors: Alan Gordon

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net