A simple C# implementation of the extended Euclidean algorithm.