Tutorial Samples

This section contains sample abstracts for the C# Tutorials. Each abstract contains links that allow you to open the sample in the development environment and copy the sample source files to your hard drive.

Sample Description
Hello World Shows a Hello World application.
Command Line Parameters Shows simple command-line processing; also shows array indexing.
Arrays Shows how to use arrays.
Properties Shows how properties are declared and used; also demonstrates abstract properties.
Libraries Shows how to use compiler options to create a DLL from multiple source files; also, how to use the library in other programs.
Versioning Demonstrates versioning in C# through the use of the override and new keywords.
Collection Classes Shows how to make collection classes that can be used with the foreach statement.
Structs Shows how to use structs in C#.
Indexers Shows how to use array notation to access an object.
Indexed Properties Shows how to implement a class that uses indexed properties. Indexed properties allow you to use a class that represents an array-like collection of several different kinds of things.
User-Defined Conversions Shows how to define conversions to and from user-defined types.
Operator Overloading Shows how user-defined classes can overload operators.
Delegates Shows how delegates are declared, mapped, and combined.
Events Shows how to use events in C#.
Explicit Interface Implementation Demonstrates how to explicitly implement interface members.
Conditional Methods Demonstrates conditional methods, which provide a powerful mechanism by which calls to methods can be included or omitted depending on whether a symbol is defined.
XML Documentation Shows how to document code by using XML.
Platform Invoke Shows how to call platform invokes (exported DLL functions) from C#.
COM InterOp Part 1 Shows how to use C# to interoperate with COM objects.
COM Interop Part 2 Shows how to a use a C# server with a C++ COM client.
Attributes Shows how to create custom attribute classes, use them in code, and query them through reflection.
Security Discusses .NET Framework security and shows two ways to modify security permissions in C#: permission classes and permission attributes.
Threading Demonstrates various thread activities such as creating and executing a thread, synchronizing threads, interacting between threads, and using a thread pool.
Unsafe Code Shows how to use pointers.
OLE DB Demonstrates how to use a Microsoft Access database from C#. It shows how you can create a dataset and add tables to it from a database.

See Also

Visual C# Samples