I'm writing a pile of C# lately. Mostly I've been working on a project for school in my spare time. (I'm in the 11th year of my 4 year degree at www.oit.edu) I'm working on a virtual CPU and OS in C#. It was (is being) written for an Operating Systems Class. As a process, it's single threaded, because it's meant to teach one how OS's schedule processes and provide services. It has 36 "opcodes" for things like MOV, PUSHI, etc...It differentiates between process memory, addressable memory and physical memory. It supports virtual memory, swapping 16 byte pages to XML (kind of silly, but fun).
What's interesting about it, IMHO, is that in the process of writing it I've used nearly all the features of C#, and a few neat ones of the .NET Framework like serialization:
Like:OS Feature à C#, DOTNET Feature
VirtualMemory à XML Serialization, System.IORunningProcesses à System.CollectionsPhysicalMemory à "fixed", "unsafe"ProcessScheduling à ArrayList, IComparableInstructionParsing à System.RegExMemory Protection à Operating Overloading
And about a dozen more. More on this soon, or you may see it posted on a C# code site.
Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. I am a failed stand-up comic, a cornrower, and a book author.
Disclaimer: The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.