C# Track

Story, Bites, and Repositories

Story Index Introduction Summary of language and peek at what is coming Models Models of structure and semantics Data Types & instances Operations Callable objects Structures Class structure Libraries Standard and community libraries References Resource links    
Bite Index Introduction Getting started Hello Hello world program Data Type system and instances Objects Code abstractions Generics Writing flexible code Iteration Using std lib and user-defined enumerable containers Execution Details of managed execution model libraries Programming facilities Glossary Glossary of CSharp terms    
Figure 1. C# demo code
"C# is designed to be a platform-neutral language, a workhorse for cross-platform applications."
- Anders Hejlsberg, creator of C#

There are four ways of viewing CSharp content in this site:
  1. CSharp Story
    An ebook with seven chapters that covers CSharp programming at intermediate level.
  2. CSharp Bites
    A large collection of pages each focused on one feature of the CSharp programming language, starting with basics.
  3. Blogs
    There are now, as of 07 Jan 2025, no C# blogs. That is expected to change eventually.
  4. dotnet fiddle Playground code examples
It's easy to sample each of these views by using the links above, or more selectively, using links in the C# Explorer's panel on the left. The code above on the right illustrates a CSharp "ShowType" function, useful for evaluating library and user-defined types.
Everything below this line is a place-holder for content to come.

Table 1. CSharp Resources from this site

Site Resources Content
CSharp Repositories Index of all the CSharp code repositories
CSharp Models Summary of features with screenshots and examples - pdf
CSharp Story
Index at upper right on this page.
CSharp ebook in 7 chapters
first chapter in CSharp Story
CSharp Bites
Index at upper right on this page.
Dozens of Code Bites about CSharp
first CSharp Bite <-- good place to go after this page
CSharp Glossary Definitions of common terms
CSharp FlashCards Basic types and data structures
Bits of Code Compares small C++, CSharp, C#, Python, and JavaScript codes  
CSharp Playground online compiler
Code Examples Content
CSharp Repositories Index into CSharp Repositories
CSharp Code examples List of CSharpBites code examples, CSharpPlayground code examples, CSharp Basic Demos Repository
online code execution RustPlayground, tutorialspoint
Other Resources Content
CSharp Guide Definition and examples of CSharp collections, iterators, and concurrency constructs.
Tooling Using Visual Studio Code to create and build CSharp code
CSharp home site Download and install, learn CSharp
CSharp user's forum Create an account and you can log-in, read, and post messages and questions.
The CSharp Reference Semi-formal, but surprisingly readable, reference for CSharp
CSharp API Guidelines Guidelines for crafting CSharp code, from the source
Other intermediate and advanced resources
How to learn modern CSharp A collection of links to explorations of intermediate and advanced language materials
idiomatic CSharp resources Annotated links to articles and examples of community accepted styles and patterns for CSharp code.
 
You can find videos covering some of the topics in Table 1. and Table 2. using the "Videos" link in the top menu. First CSharp Bite is a good next step after this page.

Exercises

  1. Write a CSharp program to find the largest file in a specified directory tree, using walkdir crate from crates.io.
  2. Ammend Project #1 by accepting arguments from the command line, using args crate.
  3. Use ChatGPT to create a directory traversal crate and use that instead of walkdir.
  4. Write a CSharp program to read a source code file and count the number of lines and number of scopes for each function. You can count scopes by counting open braces "{". Start by searhing for fn and then read each line searching for "{" and "}". Push each open brace on a stack, and pop when a closed brace is encountered. When the stack is empty, the end of the function has been reached.
  5. Modify Project #4 by counting lines and scopes for each file in a directory tree rooted at a specified folder, usually named "src".