Clone wiki

M42 Graphs / Home

M42 Graphs

Welcome to the M42 Graphs project. Its goal:

To provide a library of classes and functionality for working with graphs.


  • Covariant interfaces.
  • Supports vertices of any type.
  • Edges only requirement is implementing IEdge<TVertex>.
  • Writes DOT and GraphML files.
  • Reads GraphML files.
  • Support for reading and writing custom attributes.

Why this library?

The only mature library for working with Graphs in .NET is QuickGraph, but it has its share of quirks and bugs, and it is hard to use. QuickGraph is no longer being maintained: its last release was in May 2011. Therefore, I made this library to suit my needs and to be easy to use.


Use NuGet to install the latest version in your project:

PM> Install-Package M42.Collections.Graphs

Supported platforms

This library is a Portable Class Library. It supports the following platforms:

  • .NET for Windows Store apps
  • .NET Framework 4.5 or newer
  • Silverlight 5 or newer
  • Windows Phone 8



If you have any issues, encounter a bug or want to request a feature, please have a look at the Issues page. If you can't find a similar issue, bug or feature request, you are welcome to add your own.

If you have coded improvements you want to share, please do a pull request.


This library is written by me, Daniel Pelsmaeker. You can contact me through BitBucket.



Copyright (C) 2012-2013 Daniel Pelsmaeker

M42 Graphs is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

M42 Graphs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


Copyright (C) 2012-2013 Daniel Pelsmaeker

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the file License.txt.