Home

Awesome

DotNetSamples

A collection of very very very basic .NET and C# samples. You can browse and see various usage of

C# Arguments – demonstrates usage of arguments in C# methods

Chat with TCP – a chat server and client using the TCP protocol

Collections – usage of .NET collections

Complex – usage of operator overloading

Default Arguments – demo of Parallel.ForEach

Delegates – usage of delegates in C#

DirectorySearcher – search directories using the DirectoryInfo class

DownloadString – WebClient demo

Events – simple Button.Click event handling

Exceptions – demo of Thread.Abort

Extension Methods – C# extension methods

Fibonacci – recursively calculating the Fibonacci sequence in C# using Func delegate

FileReaderWriter - FileStream, StreamReader and StreamWriter demo on how to read and write to a file using C#

FileSystemWatcher – get notified of file system events (file created, deleted etc.)

Generics and IO – demo of a generic Dictionary being written and read from a file

Globalization – using globalization classes to display currencies and date/time information in a variety of countries

HttpWebRequest – HttpWebRequest demo to connect to an HTTP server

MD5 Hashing - MD5 hashing using C#

MultiplyMatrices – multiply two matrices

Object Serialization – serialize an object using XmlSerializer class

Processes enumeration – get processes that are currently running on your machine

Reflection – use reflection in C# to discover information about unknown types and classes

Regex and pattern matching – use of regular expressions in C#

SendMail – how to send e-mail using C#

StopWatch – using a stopwatch in C# to count passing time

StringBuilder – an efficient class for heavy string manipulation

Threading – how to use threads in C# using classes in the System.Threading namespace

Timers – how to use timers in C#

XML DOM – read XML via XmlTextReader class

On the folder Other, there are more samples in the various folders. Specifically,

Various Windows Phone Samples. Includes

Some Windows 8 User Experience (UX) patterns I've worked on. They were presented at EuroPLoP 2013, the premier European conference on patterns and pattern languages. I do not maintain the specific solution, check my Universal Helpers project for XAML behaviors and helpful UI stuff for Universal Windows Platform here: http://dgkanatsios.com/2015/12/11/universal-helpers-library-for-the-universal-windows-platform/

CSAsyncWin8: A small demo of the new async keyword in C#. Demo was presented at the first ever Windows 8 development event in Greece, in 2012. Try playing with it by commenting/uncommenting designated lines of code at btn_Start method in BlankPage.xaml.cs to see the results!

KinectFirstWords: A proof of concept letter matching WPF application with XAML using Kinect v1 as input

WCFSamples: Windows Communication Foundation samples. Includes a Duplex sample (chat client/server), a console app with C# configuration and a Windows Forms app with XML configuration

CSharpReflectionSamples: Some C# Reflection Samples.

CSharpLanguageEnhancements: Some demos of the C# 3.0 Language enhancements (LINQ, Extension Methods, Object Initializers, auto implemented properties and more). LINQ To SQL demos reguire the Northwind database (http://northwinddatabase.codeplex.com/).