Programming in CSharp
CSharp is designed for the .NET framework. The .NET framework is object oriented. CSharp has a great set of tools for the object oriented programmer. CSharp is the first component oriented language in the C/C++ family. Component concepts are first class:
Properties, methods, events
Design-time and run-time attributes
integrated documentation using XML
CSharp can be embedded in web pages. In C++ and Java primitive date types (int, double, etc) are magic and do not interoperate with objects. In Smalltalk and Lisp primitive types are objects, but at great performence cost. CSharp unifies this with no performance cost. CSharp also adds new primitive data types, for example decimal. Collections work for all types.
…
In C# everything must be inside a class. Thus also the Main method must be contained inside a class. In the first example this is Hello1. The method name, Main, is reserved for the starting point of a program. Main is often called the entry point (starting address) of the program. In front of the word Main is a static modifier. The static modifier explains that this method works in this specific class only, rather than an instance of the class. This is necessary, because when a program begins, no object instances exists.
…
A pointer is a data type whose value refers directly to (”points to”) another value stored elsewhere in the computer memory using its address. Thus the pointer has an address and contains (as value) an address. Obtaining the value that a pointer referes to is called dereferencing. The dereference operator is *. Pointers in CSharp must be declared unsafe.
…
Website: issc.rau.ac.za | Filesize: 281kb
No of Page(s): 147
Click here to download Programming in CSharp.
Related Tutorial
Tags: .NET, basic, event handling, file I/O, file manipulations, Graphics, networking, Object Oriented, Processes, remoting, string manipulations, threads
Comments
Leave a Reply