Tag Archives: winforms

C# Random MAC address generator

[Summary]Demonstrates how to create Media Access Control (MAC) addresses at random, using a helper class.[/Summary] Downloads Download source code/demo project (Visual Studio 2010 or Visual C# 2010 express) Usage The attached source code comes with a helper class, MacAddressGenerator, which takes … Continue reading

Posted in C# WinForms | Tagged , , , | Leave a comment

C# 4.0 – Optional Parameters

[Summary]Quick demonstration of how to use optional parameters, a new feature in .NET Framework 4.0.[/Summary] Downloads Download source code/demo project.  (Visual Studio 2010/Visual C# Express 2010) Optional Parameters in C# 4.0 One of the most vexatious aspects of C# .NET … Continue reading

Posted in C# WinForms | Tagged , , , | Leave a comment

Snake game written in C#

[Summary]This is my own version of the class game Snake.  This game has taken all of a few hours to develop, and the code for which is very simple.[/Summary] Preview Below is a video of the game being played for … Continue reading

Posted in C# WinForms, Game Development | Tagged , , | Leave a comment

Pong game written in C#

[Summary]This post is the culmination of a weeks work gradually developing a pong style game using C# WinForms.[/Summary] Preview Below is a video of a pong style game written in C#.  The code is relatively simple, but too long to … Continue reading

Posted in C# WinForms, Game Development | Tagged , , | Leave a comment

C# Tracking cursor position and click events

[Summary]The purpose of this tutorial is to investigate how to follow the cursor on a Windows Form (WinForm), and use its position to determine if we have clicked on a simple object.[/Summary] Downloads Download source code / demo project.  (Visual … Continue reading

Posted in C# WinForms, Game Development | Tagged , , | Leave a comment

C# Collision Detection

[Summary]Collision detection is a fundamental part of games development.  You would be hard pressed to find a game without it, and developing it doesn’t have to be complicated.[/Summary] Introduction The purpose of this tutorial is to introduce the absolute basics … Continue reading

Posted in C# WinForms, Game Development, General | Tagged , , | Leave a comment

C# random letter generator

Generating letters at random can be useful.  Here is some very simple code to achieve this; [csharp] /// <summary> /// Gets a letter from the English alphabet at random /// </summary> public static class RandomLetter { private const string _characters … Continue reading

Posted in C# WinForms, C# WPF | Tagged , , , | Leave a comment

C# National Lottery number generator explained…

Introduction This is not your normal, everyday random number generator.  The purpose of this program is to collate a list of numbers (6 numbers, 1 through 49) using real draw data.  There is nothing random about this process.  What we are going to … Continue reading

Posted in C# WinForms | Tagged , , | Leave a comment

C# National Lottery Number Generator updated…

Hi, Just a quick note to say that this morning I have updated the National Lottery Number generator.  Updates include new WinForms UI and App.config file for easier use. C# National Lottery Number Generator Enjoy

Posted in C# WinForms | Tagged , , | Leave a comment

C# Serialization Tutorial (BinaryFormatter, SoapFormatter, XmlSerializer)

Good afternoon, I have just released a brief tutorial explaining the basics of serialization in the .NET framework. C# Serialization Tutorial (BinaryFormatter, SoapFormatter, XmlSerializer) Enjoy Jon

Posted in C# WinForms | Tagged , , | Leave a comment